{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/13185","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/13185/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/13185/comments","events_url":"https://api.github.com/repos/golang/go/issues/13185/events","html_url":"https://github.com/golang/go/issues/13185","id":115739931,"number":13185,"title":"encoding/xml: unexpected behavior of encoder.Indent(\"\", \"\")","user":{"login":"poffe","id":1055995,"avatar_url":"https://avatars3.githubusercontent.com/u/1055995?v=4","gravatar_id":"","url":"https://api.github.com/users/poffe","html_url":"https://github.com/poffe","followers_url":"https://api.github.com/users/poffe/followers","following_url":"https://api.github.com/users/poffe/following{/other_user}","gists_url":"https://api.github.com/users/poffe/gists{/gist_id}","starred_url":"https://api.github.com/users/poffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poffe/subscriptions","organizations_url":"https://api.github.com/users/poffe/orgs","repos_url":"https://api.github.com/users/poffe/repos","events_url":"https://api.github.com/users/poffe/events{/privacy}","received_events_url":"https://api.github.com/users/poffe/received_events","type":"User","site_admin":false},"labels":[{"id":373399998,"url":"https://api.github.com/repos/golang/go/labels/NeedsFix","name":"NeedsFix","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestone/6","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1282,"closed_issues":1023,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2018-04-21T13:46:45Z","due_on":"2099-12-31T08:00:00Z","closed_at":null},"comments":5,"created_at":"2015-11-08T15:35:58Z","updated_at":"2018-04-23T16:16:57Z","closed_at":null,"author_association":"NONE","body":"Marshaling xml with prefix and indent set to empty strings results in unindented xml. Tested in Go 1.5.1 darwin/amd64.\n\nThe following code:\n\n``` go\npackage main\n\nimport (\n    \"encoding/xml\"\n    \"fmt\"\n)\n\ntype Person struct {\n    XMLName   xml.Name `xml:\"person\"`\n    Id        int      `xml:\"id,attr\"`\n    FirstName string   `xml:\"name>first\"`\n    LastName  string   `xml:\"name>last\"`\n    Age       int      `xml:\"age\"`\n}\n\nfunc main() {\n    v := &Person{Id: 13, FirstName: \"John\", LastName: \"Doe\", Age: 42}\n\n    output, err := xml.MarshalIndent(v, \"\", \"\")\n    if err != nil {\n        fmt.Printf(\"error: %v\\n\", err)\n    }\n\n    fmt.Println(string(output))\n}\n```\n\ngives:\n\n``` xml\n<person id=\"13\"><name><first>John</first><last>Doe</last></name><age>42</age></person>\n```\n\nbut expteded was:\n\n``` xml\n<person id=\"13\">\n<name>\n<first>John</first>\n<last>Doe</last>\n</name>\n<age>42</age>\n</person>\n```\n\nI know, not major, but believe it or not, I actually need the latter behavior. :-)\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/383634122","html_url":"https://github.com/golang/go/issues/13185#issuecomment-383634122","issue_url":"https://api.github.com/repos/golang/go/issues/13185","id":383634122,"user":{"login":"iWdGo","id":19574010,"avatar_url":"https://avatars0.githubusercontent.com/u/19574010?v=4","gravatar_id":"","url":"https://api.github.com/users/iWdGo","html_url":"https://github.com/iWdGo","followers_url":"https://api.github.com/users/iWdGo/followers","following_url":"https://api.github.com/users/iWdGo/following{/other_user}","gists_url":"https://api.github.com/users/iWdGo/gists{/gist_id}","starred_url":"https://api.github.com/users/iWdGo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iWdGo/subscriptions","organizations_url":"https://api.github.com/users/iWdGo/orgs","repos_url":"https://api.github.com/users/iWdGo/repos","events_url":"https://api.github.com/users/iWdGo/events{/privacy}","received_events_url":"https://api.github.com/users/iWdGo/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T16:16:57Z","updated_at":"2018-04-23T16:16:57Z","author_association":"NONE","body":"The fix has been adapted to fix #7113 "}}
{"actor":{"display_login":"iWdGo"}}