{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/10570","labels_url":"https://api.github.com/repos/golang/go/issues/10570/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/10570/comments","events_url":"https://api.github.com/repos/golang/go/issues/10570/events","html_url":"https://github.com/golang/go/issues/10570","id":70658910,"number":10570,"title":"cmd/gofmt: should re-format multiline struct literal end from \"a:foo}\\n\" to \"a:foo,\\n}\\n\"","user":{"login":"nightlyone","id":1767118,"avatar_url":"https://avatars.githubusercontent.com/u/1767118?v=3","gravatar_id":"","url":"https://api.github.com/users/nightlyone","html_url":"https://github.com/nightlyone","followers_url":"https://api.github.com/users/nightlyone/followers","following_url":"https://api.github.com/users/nightlyone/following{/other_user}","gists_url":"https://api.github.com/users/nightlyone/gists{/gist_id}","starred_url":"https://api.github.com/users/nightlyone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nightlyone/subscriptions","organizations_url":"https://api.github.com/users/nightlyone/orgs","repos_url":"https://api.github.com/users/nightlyone/repos","events_url":"https://api.github.com/users/nightlyone/events{/privacy}","received_events_url":"https://api.github.com/users/nightlyone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestones/Unplanned","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://avatars.githubusercontent.com/u/104030?v=3","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":848,"closed_issues":20,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2015-04-24T14:20:28Z","due_on":"2099-12-31T05:00:00Z","closed_at":null},"comments":2,"created_at":"2015-04-24T10:59:02Z","updated_at":"2015-04-24T21:45:56Z","closed_at":null,"body":" * What version of Go are you using (go version)?\r\n`go version go1.4.1 linux/amd64`\r\n * What operating system and processor architecture are you using?\r\n`Linux` on `amd64`\r\n* What did you do?\r\nrunning `gofmt -w` on code at http://play.golang.org/p/588xSKFhg1\r\n * What did you expect to see?\r\nI expect to see  `b: 2` then comma, newline, closing brace/curly bracket as in:\r\n```go\r\npackage main\r\n\r\ntype A struct {\r\n\ta int\r\n\tb int\r\n}\r\n\r\nfunc main() {\r\n\tx := A{\r\n\t\ta: 1,\r\n\t\tb: 2,\r\n\t}\r\n}\r\n```\r\n * What did you see instead?\r\nI did see a closing curly brace hugging the field value `2` of `A.b` as in:\r\n```go\r\npackage main\r\n\r\ntype A struct {\r\n\ta int\r\n\tb int\r\n}\r\n\r\nfunc main() {\r\n\tx := A{\r\n\t\ta: 1,\r\n\t\tb: 2}\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/96074371","html_url":"https://github.com/golang/go/issues/10570#issuecomment-96074371","issue_url":"https://api.github.com/repos/golang/go/issues/10570","id":96074371,"user":{"login":"minux","id":135652,"avatar_url":"https://avatars.githubusercontent.com/u/135652?v=3","gravatar_id":"","url":"https://api.github.com/users/minux","html_url":"https://github.com/minux","followers_url":"https://api.github.com/users/minux/followers","following_url":"https://api.github.com/users/minux/following{/other_user}","gists_url":"https://api.github.com/users/minux/gists{/gist_id}","starred_url":"https://api.github.com/users/minux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minux/subscriptions","organizations_url":"https://api.github.com/users/minux/orgs","repos_url":"https://api.github.com/users/minux/repos","events_url":"https://api.github.com/users/minux/events{/privacy}","received_events_url":"https://api.github.com/users/minux/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T21:45:56Z","updated_at":"2015-04-24T21:45:56Z","body":"And not to mention that if the input already contains \",\\n}\", gofmt will\npreserve the comma and the newline.\n\nhttp://play.golang.org/p/QVUVHBsLNo\n"}}