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:
commit
701b2e2ea8
@ -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{}
|
||||||
|
Loading…
Reference in New Issue
Block a user