diff --git a/g_appcode.go b/g_appcode.go index 76d78ad..95c3fae 100644 --- a/g_appcode.go +++ b/g_appcode.go @@ -983,6 +983,14 @@ func getPackagePath(curpath string) (packpath string) { wgopath := filepath.SplitList(gopath) for _, wg := range wgopath { + //Maybe is a path + if filepath.HasPrefix(strings.ToLower(curpath), strings.ToLower(wg)) { + haspath = true + appsrcpath = wg + break + } + + //Maybe is a symlink wg, _ = filepath.EvalSymlinks(path.Join(wg, "src")) if filepath.HasPrefix(strings.ToLower(curpath), strings.ToLower(wg)) {