{"action":"created","issue":{"url":"https://api.github.com/repos/miekg/dns/issues/163","labels_url":"https://api.github.com/repos/miekg/dns/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/miekg/dns/issues/163/comments","events_url":"https://api.github.com/repos/miekg/dns/issues/163/events","html_url":"https://github.com/miekg/dns/issues/163","id":53505867,"number":163,"title":"Improve String formatting for types","user":{"login":"michaelharo","id":7861967,"avatar_url":"https://avatars.githubusercontent.com/u/7861967?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelharo","html_url":"https://github.com/michaelharo","followers_url":"https://api.github.com/users/michaelharo/followers","following_url":"https://api.github.com/users/michaelharo/following{/other_user}","gists_url":"https://api.github.com/users/michaelharo/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelharo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelharo/subscriptions","organizations_url":"https://api.github.com/users/michaelharo/orgs","repos_url":"https://api.github.com/users/michaelharo/repos","events_url":"https://api.github.com/users/michaelharo/events{/privacy}","received_events_url":"https://api.github.com/users/michaelharo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-06T11:29:39Z","updated_at":"2015-01-13T09:39:47Z","closed_at":null,"body":"I was looking into adding query logging to debug logs my program and wanted to use Question.String(), but String's formatting is geared towards dig style output and that's not ideal for a log file since it starts with a semicolon and includes tabs for whitespace.  In the end I ended up writing my own toString function that gave me \"{name} {qclass} {qtype}\" or \"github.com. IN A\".\r\n\r\nI'm unsure what to suggest as a fix since I can see String behaving like dig as useful for how everything else behaves currently.  Maybe a package level setting or something for StringMode that may be set to \"dig\" or \"plain\" where \"dig\" is the current behavior and \"plain\" (or some better name) just prints the data from that type as a string without special formatting?  Or an sprintf style solution that may have a default formatter set for each type?"},"comment":{"url":"https://api.github.com/repos/miekg/dns/issues/comments/69718428","html_url":"https://github.com/miekg/dns/issues/163#issuecomment-69718428","issue_url":"https://api.github.com/repos/miekg/dns/issues/163","id":69718428,"user":{"login":"miekg","id":353371,"avatar_url":"https://avatars.githubusercontent.com/u/353371?v=3","gravatar_id":"","url":"https://api.github.com/users/miekg","html_url":"https://github.com/miekg","followers_url":"https://api.github.com/users/miekg/followers","following_url":"https://api.github.com/users/miekg/following{/other_user}","gists_url":"https://api.github.com/users/miekg/gists{/gist_id}","starred_url":"https://api.github.com/users/miekg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miekg/subscriptions","organizations_url":"https://api.github.com/users/miekg/orgs","repos_url":"https://api.github.com/users/miekg/repos","events_url":"https://api.github.com/users/miekg/events{/privacy}","received_events_url":"https://api.github.com/users/miekg/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T09:39:47Z","updated_at":"2015-01-13T09:39:47Z","body":"What is actually the problem of writing your own? Getting the class (for instance). Is just a matter of\r\n```\r\nClass(r.Class).String()))\r\n```\r\n\r\nGetting access to the rdata *is* something that might be needed. I'm thinking of dropping the format modifiers and only focusing on the Field function in there (=format branch) "}}