{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/17262","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/17262/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/17262/comments","events_url":"https://api.github.com/repos/golang/go/issues/17262/events","html_url":"https://github.com/golang/go/issues/17262","id":179771596,"number":17262,"title":"proposal: assume GOPATH=$HOME/gocode if not set","user":{"login":"davecheney","id":7171,"avatar_url":"https://avatars.githubusercontent.com/u/7171?v=3","gravatar_id":"","url":"https://api.github.com/users/davecheney","html_url":"https://github.com/davecheney","followers_url":"https://api.github.com/users/davecheney/followers","following_url":"https://api.github.com/users/davecheney/following{/other_user}","gists_url":"https://api.github.com/users/davecheney/gists{/gist_id}","starred_url":"https://api.github.com/users/davecheney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecheney/subscriptions","organizations_url":"https://api.github.com/users/davecheney/orgs","repos_url":"https://api.github.com/users/davecheney/repos","events_url":"https://api.github.com/users/davecheney/events{/privacy}","received_events_url":"https://api.github.com/users/davecheney/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/Proposal","name":"Proposal","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":29,"created_at":"2016-09-28T13:24:36Z","updated_at":"2016-09-29T01:02:18Z","closed_at":null,"body":"This proposal is a simplification of #12488.\r\n\r\nIn short, if the user has not set `$GOPATH` in their environment the `go` tool will default to a value of `GOPATH=$HOME/gocode`.\r\n<hr>\r\n*Rationale*\r\nAt the moment all the documentation we have says \"you have to set a GOPATH\", then people get distracted and upset because they don't understand why they have to do this.\r\n\r\nBy choosing a default GOPATH, we can make our documentation easier because we can say things like\r\n```\r\n$ go get github.com/foo/bar\r\n```\r\nwill check out the `github.com/foo/bar` repo into `$HOME/gocode/src/github.com/foo/bar`. \r\n\r\nWe don't need to distract newcomers with having to set an env var, all we need to do is put a little parenthetical note at the bottom of the page\r\n\r\n> `$HOME/gocode` is the default path to your go workspace. If you want to change this path, set the `GOPATH` variable to something of your choosing.\r\n\r\n*Compatibility*\r\nThis proposal only changes the experience for newcomers who have not chosen to set a `$GOPATH` variable. For anyone using Go 1.1-1.7 today, your experience will be unchanged as you are currently required to set `$GOPATH`."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/250344014","html_url":"https://github.com/golang/go/issues/17262#issuecomment-250344014","issue_url":"https://api.github.com/repos/golang/go/issues/17262","id":250344014,"user":{"login":"alexbrainman","id":9796621,"avatar_url":"https://avatars.githubusercontent.com/u/9796621?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbrainman","html_url":"https://github.com/alexbrainman","followers_url":"https://api.github.com/users/alexbrainman/followers","following_url":"https://api.github.com/users/alexbrainman/following{/other_user}","gists_url":"https://api.github.com/users/alexbrainman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbrainman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbrainman/subscriptions","organizations_url":"https://api.github.com/users/alexbrainman/orgs","repos_url":"https://api.github.com/users/alexbrainman/repos","events_url":"https://api.github.com/users/alexbrainman/events{/privacy}","received_events_url":"https://api.github.com/users/alexbrainman/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T01:02:18Z","updated_at":"2016-09-29T01:02:18Z","body":"> I assume there is some notion of a base path where documents and settings are stored.\r\n\r\nI don't know of such thing. Perhaps other Windows users will comment here.\r\n\r\n> If no such path exists, assume C:/gocode.\r\n\r\nYou want C:\\gocode instead.\r\nPutting things in the root of C:\\ does not sounds right to me. Would you recommend GOPATH to be set to /gocode on Linux?\r\nBut, given that Windows installer already installs Go into C:\\go, C:\\gocode for GOPATH is at least consistent.\r\n\r\nAlex"}}
{"actor":{"display_login":"alexbrainman"}}