Skip to content

Commit

Permalink
fix: root path on windows bug (#34)
Browse files Browse the repository at this point in the history
* rebase upstream

* rebase

* trim no need line

* trim no need line

* trim no need line

* fix bug on windows

Co-authored-by: kingxt <dream4kingxt@163.com>
  • Loading branch information
kingxt and kingxt authored Sep 2, 2020
1 parent b7a018b commit 33eb293
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/goctl/util/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func FindGoModPath(dir string) (string, bool) {
for {
if FileExists(filepath.Join(tempPath, goModeIdentifier)) {
tempPath = filepath.Dir(tempPath)
rootPath = absDir[len(tempPath)+1:]
rootPath = strings.TrimPrefix(absDir[len(tempPath):], "/")
hasGoMod = true
break
}
Expand Down

0 comments on commit 33eb293

Please sign in to comment.