1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 05:00:54 +00:00

Merge pull request #388 from beego/master

send the PR from master to develop
This commit is contained in:
Sergey Lanzman 2017-03-23 16:01:45 +02:00 committed by GitHub
commit 701b2e2ea8

View File

@ -61,6 +61,14 @@ func GetGOPATHs() []string {
return paths return paths
} }
// IsInGOPATH checks the path is in the fisrt GOPATH(/src) or not
func IsInGOPATH(thePath string) bool {
if runtime.GOOS == "windows" {
thePath = filepath.ToSlash(thePath)
}
return strings.Contains(thePath, GetGOPATHs()[0]+"/src")
}
// IsBeegoProject checks whether the current path is a Beego application or not // IsBeegoProject checks whether the current path is a Beego application or not
func IsBeegoProject(thePath string) bool { func IsBeegoProject(thePath string) bool {
mainFiles := []string{} mainFiles := []string{}