mirror of
https://github.com/foomo/gotsrpc.git
synced 2025-10-16 12:35:35 +00:00
feat: fix std library search
This commit is contained in:
parent
2eca78edf2
commit
754aeea830
11
gotsrpc.go
11
gotsrpc.go
@ -144,10 +144,13 @@ func parseDir(goPaths []string, gomod config.Namespace, packageName string) (map
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if strings.HasSuffix(goPath, "vendor") {
|
||||
dir = path.Join(goPath, packageName)
|
||||
} else {
|
||||
dir = path.Join(goPath, "src", packageName)
|
||||
}
|
||||
if dir == "" {
|
||||
if strings.HasSuffix(goPath, "vendor") {
|
||||
dir = path.Join(goPath, packageName)
|
||||
} else {
|
||||
dir = path.Join(goPath, "src", packageName)
|
||||
}
|
||||
}
|
||||
pkgs, err := parser.ParseDir(fset, dir, parserExcludeFiles, parser.AllErrors)
|
||||
if err == nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user