diff options
Diffstat (limited to 'cmd/ponzu/add.go')
-rw-r--r-- | cmd/ponzu/add.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/cmd/ponzu/add.go b/cmd/ponzu/add.go index abac59c..05d6f16 100644 --- a/cmd/ponzu/add.go +++ b/cmd/ponzu/add.go @@ -6,9 +6,7 @@ import ( "io" "os" "os/exec" - "os/user" "path/filepath" - "runtime" "strings" ) @@ -60,31 +58,6 @@ func getAddon(args []string) error { return nil } -// resolve GOPATH. In 1.8 can be default, or custom. A custom GOPATH can -// also contain multiple paths, in which case 'go get' uses the first -func getGOPATH() (string, error) { - var gopath string - gopath = os.Getenv("GOPATH") - if gopath == "" { - // not set, find the default - usr, err := user.Current() - if err != nil { - return gopath, err - } - gopath = filepath.Join(usr.HomeDir, "go") - } else { - // parse out in case of multiple, retain first - if runtime.GOOS == "windows" { - gopaths := strings.Split(gopath, ";") - gopath = gopaths[0] - } else { - gopaths := strings.Split(gopath, ":") - gopath = gopaths[0] - } - } - return gopath, nil -} - // this is distinct from copyAll() in that files are copied, not moved, // since we also need them to remain in $GOPATH/src // thanks to @markc of stack overflow for the copyFile and copyFileContents functions |