{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode-go/issues/230","repository_url":"https://api.github.com/repos/Microsoft/vscode-go","labels_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/230/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/230/comments","events_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/230/events","html_url":"https://github.com/Microsoft/vscode-go/issues/230","id":139034488,"number":230,"title":"Github imports are sorted differently than when using go fmt manually","user":{"login":"samuell","id":125003,"avatar_url":"https://avatars.githubusercontent.com/u/125003?v=3","gravatar_id":"","url":"https://api.github.com/users/samuell","html_url":"https://github.com/samuell","followers_url":"https://api.github.com/users/samuell/followers","following_url":"https://api.github.com/users/samuell/following{/other_user}","gists_url":"https://api.github.com/users/samuell/gists{/gist_id}","starred_url":"https://api.github.com/users/samuell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuell/subscriptions","organizations_url":"https://api.github.com/users/samuell/orgs","repos_url":"https://api.github.com/users/samuell/repos","events_url":"https://api.github.com/users/samuell/events{/privacy}","received_events_url":"https://api.github.com/users/samuell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-07T17:07:52Z","updated_at":"2016-03-07T17:43:27Z","closed_at":"2016-03-07T17:23:08Z","body":"#### How to reproduce\r\n\r\nPaste this code (which is manually formatted with `go fmt`) in a new go file:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n    \"fmt\"\r\n    \"github.com/samuell/scipipe\"\r\n    \"strings\"\r\n)\r\n\r\nfunc main() {\r\n    fmt.Println(strings.ToLower(\"Hello World!\"))\r\n    scipipe.NewShellProcess(\"echo\")\r\n}\r\n```\r\n\r\n... and press Ctrl + Shift + I to format the code.\r\n\r\nThe imports will now be formatted like this:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\t\"strings\"\r\n\r\n\t\"github.com/samuell/scipipe\"\r\n)\r\n\r\nfunc main() {\r\n\tfmt.Println(strings.ToLower(\"Hello World!\"))\r\n\tscipipe.NewShellProcess(\"echo\")\r\n}\r\n\r\n```\r\n\r\nSo, the github URL is sorted separately from the other imports, with an empty line in between. Manually running `go fmt` on the file again, will restore the code to the first version above."},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode-go/issues/comments/193365612","html_url":"https://github.com/Microsoft/vscode-go/issues/230#issuecomment-193365612","issue_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/230","id":193365612,"user":{"login":"lukehoban","id":223467,"avatar_url":"https://avatars.githubusercontent.com/u/223467?v=3","gravatar_id":"","url":"https://api.github.com/users/lukehoban","html_url":"https://github.com/lukehoban","followers_url":"https://api.github.com/users/lukehoban/followers","following_url":"https://api.github.com/users/lukehoban/following{/other_user}","gists_url":"https://api.github.com/users/lukehoban/gists{/gist_id}","starred_url":"https://api.github.com/users/lukehoban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukehoban/subscriptions","organizations_url":"https://api.github.com/users/lukehoban/orgs","repos_url":"https://api.github.com/users/lukehoban/repos","events_url":"https://api.github.com/users/lukehoban/events{/privacy}","received_events_url":"https://api.github.com/users/lukehoban/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T17:43:27Z","updated_at":"2016-03-07T17:43:27Z","body":"That's right. Note that you can change the formatting tool with the `go.formatTool` setting. See https://github.com/Microsoft/vscode-go/blob/master/README.md#options. "}}