diff --git a/cmd/gopath.go b/cmd/gopath.go index 066047fdf..4ae0b29c6 100644 --- a/cmd/gopath.go +++ b/cmd/gopath.go @@ -164,7 +164,7 @@ func execCmd(gopath, curPath string, args ...string) error { log.Log("Setting GOPATH to %s", gopath) sep := ":" - if runtime.GOOS == "windos" { + if runtime.GOOS == "windows" { sep = ";" } err = os.Setenv("GOPATH", gopath+sep+oldGoPath) diff --git a/log/log_windows.go b/log/log_windows.go index fcfa4174a..5650bb0d3 100644 --- a/log/log_windows.go +++ b/log/log_windows.go @@ -33,13 +33,11 @@ func Fatal(hl, msg string) { } func Log(format string, args ...interface{}) { - fmt.Printf("gopm INFO %s\n", - fmt.Sprintf(format, args...)) + fmt.Printf("gopm INFO %s\n", fmt.Sprintf(format, args...)) } func Trace(format string, args ...interface{}) { - fmt.Printf("gopm TRAC %s\n", - fmt.Sprintf(format, args...)) + fmt.Printf("gopm TRAC %s\n", fmt.Sprintf(format, args...)) } func Success(title, hl, msg string) { @@ -55,3 +53,8 @@ func Message(hl, msg string) { } fmt.Printf("gopm MSG!%s %s\n", hl, msg) } + +func Help(format string, args ...interface{}) { + fmt.Printf("gopm HELP %s\n", fmt.Sprintf(format, args...)) + os.Exit(2) +}