fix windows bug

This commit is contained in:
kingxt 2020-08-12 10:23:49 +08:00 committed by Kevin Wan
parent d408a0d49b
commit fd75f700a2

View File

@ -28,6 +28,9 @@ func getParentPackage(dir string) (string, error) {
var tempPath = absDir
var hasGoMod = false
for {
if tempPath == filepath.Dir(tempPath) {
break
}
tempPath = filepath.Dir(tempPath)
if goctlutil.FileExists(filepath.Join(tempPath, goModeIdentifier)) {
tempPath = filepath.Dir(tempPath)