mirror of
https://github.com/beego/bee.git
synced 2024-11-22 10:10:53 +00:00
fix #2581
This commit is contained in:
parent
6afbafa250
commit
ffbe29ae22
@ -60,9 +60,6 @@ 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 {
|
||||||
if runtime.GOOS == "windows" {
|
|
||||||
thePath = filepath.ToSlash(thePath)
|
|
||||||
}
|
|
||||||
for _, gopath := range GetGOPATHs() {
|
for _, gopath := range GetGOPATHs() {
|
||||||
if strings.Contains(thePath, filepath.Join(gopath, "src")) {
|
if strings.Contains(thePath, filepath.Join(gopath, "src")) {
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user