🎨 Fix #322
This commit is contained in:
parent
eba96fd0b6
commit
2108a9b407
21
util/go.go
21
util/go.go
|
@ -34,24 +34,9 @@ type mygo struct{}
|
||||||
var Go = mygo{}
|
var Go = mygo{}
|
||||||
|
|
||||||
func (*mygo) GetCrossPlatforms() []string {
|
func (*mygo) GetCrossPlatforms() []string {
|
||||||
ret := []string{}
|
return []string{
|
||||||
|
"darwin_amd64", "linux_amd64", "windows_amd64",
|
||||||
toolDir := runtime.GOROOT() + "/pkg/tool"
|
"linux_arm", "darwin_386", "linux_386", "windows_386"}
|
||||||
f, _ := os.Open(toolDir)
|
|
||||||
names, _ := f.Readdirnames(-1)
|
|
||||||
f.Close()
|
|
||||||
|
|
||||||
for _, name := range names {
|
|
||||||
subDir, _ := os.Open(toolDir + "/" + name)
|
|
||||||
tools, _ := subDir.Readdirnames(10)
|
|
||||||
subDir.Close()
|
|
||||||
|
|
||||||
if len(tools) > 5 {
|
|
||||||
ret = append(ret, name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAPIPath gets the Go source code path.
|
// GetAPIPath gets the Go source code path.
|
||||||
|
|
|
@ -455,11 +455,9 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="hr"></li>
|
<li class="hr"></li>
|
||||||
{{range .crossPlatforms}}
|
{{range .crossPlatforms}}
|
||||||
{{if eq . "darwin_amd64" "linux_amd64" "windows_amd64" "linux_arm" "darwin_386" "linux_386" "windows_386"}}
|
|
||||||
<li class="{{.}}" onclick="tree.crossCompile('{{.}}');">
|
<li class="{{.}}" onclick="tree.crossCompile('{{.}}');">
|
||||||
<span class="space"></span> {{.}}
|
<span class="space"></span> {{.}}
|
||||||
</li>
|
</li>
|
||||||
{{end}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
<li class="hr"></li>
|
<li class="hr"></li>
|
||||||
<li class="export" onclick="tree.export(this);">
|
<li class="export" onclick="tree.export(this);">
|
||||||
|
|
Loading…
Reference in New Issue