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
1 changed files with 2 additions and 1 deletions

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
}
}