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