Fix #150
This commit is contained in:
parent
625cca8f61
commit
f83ec4faaa
|
@ -83,7 +83,10 @@ func GetFiles(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// construct Go API node
|
// construct Go API node
|
||||||
apiPath := runtime.GOROOT() + conf.PathSeparator + "src" + conf.PathSeparator + "pkg"
|
apiPath := runtime.GOROOT() + conf.PathSeparator + "src" + conf.PathSeparator + "pkg" // before Go 1.4
|
||||||
|
if !util.File.IsExist(apiPath) {
|
||||||
|
apiPath = runtime.GOROOT() + conf.PathSeparator + "src" // Go 1.4 and after
|
||||||
|
}
|
||||||
|
|
||||||
apiNode := FileNode{Name: "Go API", Path: apiPath, IconSkin: "ico-ztree-dir-api ", Type: "d",
|
apiNode := FileNode{Name: "Go API", Path: apiPath, IconSkin: "ico-ztree-dir-api ", Type: "d",
|
||||||
Creatable: false, Removable: false, FileNodes: []*FileNode{}}
|
Creatable: false, Removable: false, FileNodes: []*FileNode{}}
|
||||||
|
|
Loading…
Reference in New Issue