1
0
mirror of https://github.com/beego/bee.git synced 2024-11-14 01:30:55 +00:00

Merge pull request #271 from CodyGuo/master

Fix to issue #270
This commit is contained in:
astaxie 2016-09-07 13:43:33 +08:00 committed by GitHub
commit 6f5df78d45

View File

@ -650,7 +650,8 @@ func checkEnv(appname string) (apppath, packpath string, err error) {
for _, gpath := range gps {
gsrcpath := path.Join(gpath, "src")
if strings.HasPrefix(currpath, gsrcpath) {
return currpath, currpath[len(gsrcpath)+1:], nil
packpath = strings.Replace(currpath[len(gsrcpath)+1:], string(path.Separator), "/", -1)
return currpath, packpath, nil
}
}