1
0
mirror of https://github.com/beego/bee.git synced 2024-06-01 19:33:28 +00:00
This commit is contained in:
Back Yu 2017-03-07 06:31:03 +00:00 committed by GitHub
commit a07319d619

View File

@ -962,6 +962,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)) {