1
0
forked from x/ContextOS

add ice.go

This commit is contained in:
shaoying 2021-08-02 01:15:02 +08:00
parent 187ad3999a
commit d293ea6794
2 changed files with 17 additions and 2 deletions

15
src/ice.go Normal file
View File

@ -0,0 +1,15 @@
package main
import (
"github.com/shylinux/ice"
)
func main() {
ice.App("web.demo", "/tool/", func(p *ice.Page) {
p.Cmd("nav", &ice.Nav{Home: "./", Prefix: "/tool"})
p.Cmd("cli.system", ice.Arg("pwd"))
p.Cmd("hash", &ice.Hash{})
p.Home = "./"
})
ice.RunServe("9090")
}

View File

@ -11,7 +11,7 @@ import (
func main() {
log.LogDisable = true
defer func() { recover() }()
args := []string{"ssh.connect", "open", "authfile", path.Join(os.Getenv("HOME"), ".ssh/", path.Base(os.Args[0])+".json")}
args = append(args, os.Args[1:]...)
print(ice.Run(args...))
print(ice.Run(append(args, os.Args[1:]...)...))
}