{"action":"closed","issue":{"url":"https://api.github.com/repos/golang/go/issues/3652","labels_url":"https://api.github.com/repos/golang/go/issues/3652/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/3652/comments","events_url":"https://api.github.com/repos/golang/go/issues/3652/events","html_url":"https://github.com/golang/go/issues/3652","id":51280936,"number":3652,"title":"cmd/go: multiple GOPATH entries don't work as expected","user":{"login":"adg","id":8446613,"avatar_url":"https://avatars.githubusercontent.com/u/8446613?v=3","gravatar_id":"","url":"https://api.github.com/users/adg","html_url":"https://github.com/adg","followers_url":"https://api.github.com/users/adg/followers","following_url":"https://api.github.com/users/adg/following{/other_user}","gists_url":"https://api.github.com/users/adg/gists{/gist_id}","starred_url":"https://api.github.com/users/adg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adg/subscriptions","organizations_url":"https://api.github.com/users/adg/orgs","repos_url":"https://api.github.com/users/adg/repos","events_url":"https://api.github.com/users/adg/events{/privacy}","received_events_url":"https://api.github.com/users/adg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"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},"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/1","html_url":"https://github.com/golang/go/milestones/Go1.5","labels_url":"https://api.github.com/repos/golang/go/milestones/1/labels","id":905105,"number":1,"title":"Go1.5","description":"","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":104,"closed_issues":901,"state":"open","created_at":"2014-12-16T02:26:41Z","updated_at":"2015-07-15T05:07:01Z","due_on":"2015-07-31T04:00:00Z","closed_at":null},"comments":17,"created_at":"2012-05-22T04:43:04Z","updated_at":"2015-07-15T05:07:01Z","closed_at":"2015-07-15T05:07:01Z","body":"<pre>In this example, $HOME/gocode is my usual GOPATH. I created a new workspace in\n$HOME/gopath2. &quot;go install&quot; of a test package succeeds, but installs the\n'test' binary to the working directory. &quot;go install test&quot; fails, as it seems\nto only look inside the first GOPATH when searching for package 'test'.\n\n~/gopath2/src/test% cat main.go\npackage main\nfunc main() {}\n~/gopath2/src/test% GOPATH=$HOME/gocode:$HOME/gopath2 go install\n~/gopath2/src/test% ls -l\ntotal 512\n-rw-r--r--  1 adg  eng      28 May 22 14:36 main.go\n-rwxr-xr-x  1 adg  eng  253968 May 22 14:39 test\n~/gopath2/src/test% rm test\n~/gopath2/src/test% GOPATH=$HOME/gocode:$HOME/gopath2 go install -x\nWORK=/var/folders/00/0sdwh000h01000cxqpysvccm0035qk/T/go-build124998625\nmkdir -p $WORK/_/Users/adg/gopath2/src/test/_obj/\ncd /Users/adg/gopath2/src/test\n/Users/adg/go/pkg/tool/darwin_amd64/6g -o $WORK/_/Users/adg/gopath2/src/test/_obj/_go_.6\n-p _/Users/adg/gopath2/src/test -D _/Users/adg/gopath2/src/test -I $WORK ./main.go\n/Users/adg/go/pkg/tool/darwin_amd64/pack grc $WORK/_/Users/adg/gopath2/src/test.a\n$WORK/_/Users/adg/gopath2/src/test/_obj/_go_.6\ncd .\n/Users/adg/go/pkg/tool/darwin_amd64/6l -o $WORK/_/Users/adg/gopath2/src/test/_obj/a.out\n-L $WORK $WORK/_/Users/adg/gopath2/src/test.a\ncp $WORK/_/Users/adg/gopath2/src/test/_obj/a.out test\n~/gopath2/src/test% rm test\n~/gopath2/src/test% GOPATH=$HOME/gocode:$HOME/gopath2 go install -x test\ncan't load package: package test: no Go source files in /Users/adg/gocode/src/test\n~/gopath2/src/test%</pre>"}}