We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7a018b commit 33eb293Copy full SHA for 33eb293
tools/goctl/util/path.go
@@ -61,7 +61,7 @@ func FindGoModPath(dir string) (string, bool) {
61
for {
62
if FileExists(filepath.Join(tempPath, goModeIdentifier)) {
63
tempPath = filepath.Dir(tempPath)
64
- rootPath = absDir[len(tempPath)+1:]
+ rootPath = strings.TrimPrefix(absDir[len(tempPath):], "/")
65
hasGoMod = true
66
break
67
}
0 commit comments