use fmt.Println instead of println

This commit is contained in:
kevin
2020-08-11 12:44:21 +08:00
committed by kingxt
parent f77c73eec1
commit 4f59fd306a
4 changed files with 7 additions and 5 deletions

View File

@@ -44,8 +44,7 @@ func getParentPackage(dir string) (string, error) {
parent := path.Join(gopath, "src")
pos := strings.Index(absDir, parent)
if pos < 0 {
message := fmt.Sprintf("%s not in gomod project path, or not in GOPATH of %s directory", absDir, gopath)
println(message)
fmt.Printf("%s not in gomod project path, or not in GOPATH of %s directory\n", absDir, gopath)
tempPath = filepath.Dir(absDir)
rootPath = absDir[len(tempPath)+1:]
} else {