From 9840fc2341f125f64a6089366197ca9012a9026f Mon Sep 17 00:00:00 2001 From: kmeister Date: Thu, 13 Apr 2017 18:32:00 -0400 Subject: [docker-exampe] moved into examples repo https://github.com/ponzu-cms/examples --- examples/docker/admin/cmd/ponzu/paths.go | 44 -------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 examples/docker/admin/cmd/ponzu/paths.go (limited to 'examples/docker/admin/cmd/ponzu/paths.go') diff --git a/examples/docker/admin/cmd/ponzu/paths.go b/examples/docker/admin/cmd/ponzu/paths.go deleted file mode 100644 index 8d5407f..0000000 --- a/examples/docker/admin/cmd/ponzu/paths.go +++ /dev/null @@ -1,44 +0,0 @@ -package main - -import ( - "os" - "os/user" - "path/filepath" - "runtime" - "strings" -) - -// buildOutputName returns the correct ponzu-server file name -// based on the host Operating System -func buildOutputName() string { - if runtime.GOOS == "windows" { - return "ponzu-server.exe" - } - - return "ponzu-server" -} - -// 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 -} -- cgit v1.2.3