gopherjs/gopherjs — pull request #62 by shurcooL (2014-06-29 22:48:12+00:00)
Title: Treat GOPATH as a list of workspaces; use first workspace.

First cut at correct GOPATH handling as a list, rather than assuming it contains no more than 1 entry. It's unfinished and needs more work to correctly handle all scenarios with multiple GOPATH workspaces, but it's an improvement over the original version.

- Fixes #60.
- The behavior should be improved (fixes #60) if user has multiple GOPATH workspaces.
- The behavior should be unchanged if user has a single GOPATH workspace.

- Use `filepath.Join` instead of concatenating strings for path manipulation.
- Use `goimports` to gofmt the code, it separates 3rd party imports from standard library imports.

While this PR can be merged as is (since it fixes a real issue), I think it's better to use it as a starting point of discussion about how completely proper GOPATH handling can be achieved. I've left a few TODOs in the code comments that need to be addressed.