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