|
|
|
@ -144,7 +144,15 @@ func latestKratos() (string, error) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func gopath() (gp string) { |
|
|
|
|
gopaths := strings.Split(os.Getenv("GOPATH"), ":") |
|
|
|
|
var gopaths []string |
|
|
|
|
|
|
|
|
|
switch runtime.GOOS { |
|
|
|
|
case "windows": |
|
|
|
|
gopaths = strings.Split(os.Getenv("GOPATH"), ";") |
|
|
|
|
default: |
|
|
|
|
gopaths = strings.Split(os.Getenv("GOPATH"), ":") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if len(gopaths) == 1 && gopaths[0] != "" { |
|
|
|
|
return gopaths[0] |
|
|
|
|
} |
|
|
|
|