Skip to content

Commit

Permalink
update gopath search for 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
casualjim committed Apr 13, 2017
1 parent d5f8ebc commit aa30237
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions path.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ func FindInGoSearchPath(pkg string) string {
// FullGoSearchPath gets the search paths for finding packages
func FullGoSearchPath() string {
allPaths := os.Getenv(GOPATHKey)
if allPaths == "" {
allPaths = filepath.Join(os.Getenv("HOME"), "go")
}
if allPaths != "" {
allPaths = strings.Join([]string{allPaths, runtime.GOROOT()}, ":")
} else {
Expand Down

0 comments on commit aa30237

Please sign in to comment.