1
0
mirror of https://github.com/beego/bee.git synced 2024-06-01 19:33:28 +00:00

Generate document errors in windows

This commit is contained in:
wzshiming 2017-05-06 18:15:23 +08:00
parent 1cc7abaac6
commit cc6ddd4c06

View File

@ -61,7 +61,8 @@ func GetGOPATHs() []string {
// IsInGOPATH checks whether the path is inside of any GOPATH or not // IsInGOPATH checks whether the path is inside of any GOPATH or not
func IsInGOPATH(thePath string) bool { func IsInGOPATH(thePath string) bool {
for _, gopath := range GetGOPATHs() { for _, gopath := range GetGOPATHs() {
if strings.Contains(thePath, filepath.Join(gopath, "src")) { b, _ := filepath.Rel(thePath, filepath.Join(gopath, "src"))
if strings.Contains(b, "..") {
return true return true
} }
} }