{"action":"created","issue":{"url":"https://api.github.com/repos/miekg/dns/issues/301","repository_url":"https://api.github.com/repos/miekg/dns","labels_url":"https://api.github.com/repos/miekg/dns/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/miekg/dns/issues/301/comments","events_url":"https://api.github.com/repos/miekg/dns/issues/301/events","html_url":"https://github.com/miekg/dns/issues/301","id":125989740,"number":301,"title":"Manipulating FQDNs","user":{"login":"tlimoncelli","id":6293917,"avatar_url":"https://avatars.githubusercontent.com/u/6293917?v=3","gravatar_id":"","url":"https://api.github.com/users/tlimoncelli","html_url":"https://github.com/tlimoncelli","followers_url":"https://api.github.com/users/tlimoncelli/followers","following_url":"https://api.github.com/users/tlimoncelli/following{/other_user}","gists_url":"https://api.github.com/users/tlimoncelli/gists{/gist_id}","starred_url":"https://api.github.com/users/tlimoncelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlimoncelli/subscriptions","organizations_url":"https://api.github.com/users/tlimoncelli/orgs","repos_url":"https://api.github.com/users/tlimoncelli/repos","events_url":"https://api.github.com/users/tlimoncelli/events{/privacy}","received_events_url":"https://api.github.com/users/tlimoncelli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-11T16:59:00Z","updated_at":"2016-02-05T04:56:00Z","closed_at":null,"body":"While using miekg/dns I've written a number of utility functions.  I would like to upstream them because I think other people would find them useful.\r\n\r\nfunc MakeFqdn(origin, s string) string\r\n// Returns \"s\" + \".\" + origin but does the right thing if s==\"@\" or IsFqdn(s).\r\n\r\nfunc StripFqdn(origin, s string) string\r\n// Strips origin from s.  Returns \"@\" instead of \"\".  Returns s unchanged if it doesn't suffix with origin.\r\n\r\nfunc GenerateZone(rrs []RR) string\r\n// The opposite of ParseZone().  Generates a very pretty zonefile.\r\n\r\nI'd gladly submit a PR however I would like your recommendation for which file to include these functions?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/miekg/dns/issues/comments/180197854","html_url":"https://github.com/miekg/dns/issues/301#issuecomment-180197854","issue_url":"https://api.github.com/repos/miekg/dns/issues/301","id":180197854,"user":{"login":"andrewtj","id":21676,"avatar_url":"https://avatars.githubusercontent.com/u/21676?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewtj","html_url":"https://github.com/andrewtj","followers_url":"https://api.github.com/users/andrewtj/followers","following_url":"https://api.github.com/users/andrewtj/following{/other_user}","gists_url":"https://api.github.com/users/andrewtj/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewtj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewtj/subscriptions","organizations_url":"https://api.github.com/users/andrewtj/orgs","repos_url":"https://api.github.com/users/andrewtj/repos","events_url":"https://api.github.com/users/andrewtj/events{/privacy}","received_events_url":"https://api.github.com/users/andrewtj/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T04:56:00Z","updated_at":"2016-02-05T04:56:00Z","body":"@miekg sounds like a good idea. There's a few instances of [this sort of thing](https://github.com/fcambus/rrda/blob/2bd46e785603e8df9c8328f1e444d2d91f52b05e/rrda.go#L57-L60) out there."}}