diff --git a/pkg/traverse/golang.go b/pkg/traverse/golang.go index a1de8284..f7d90886 100644 --- a/pkg/traverse/golang.go +++ b/pkg/traverse/golang.go @@ -8,6 +8,10 @@ import ( // GoBinDir TODO experimental func GoBinDir(tc Context) (dir string, err error) { + if path, ok := tc.LookupEnv("GOBIN"); ok { + return filepath.ToSlash(path), nil + } + if path, ok := tc.LookupEnv("GOPATH"); ok { dir = strings.Split(path, string(os.PathListSeparator))[0] }