forked from x/ContextOS
add ice.go
This commit is contained in:
parent
187ad3999a
commit
d293ea6794
15
src/ice.go
Normal file
15
src/ice.go
Normal 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")
|
||||
}
|
@ -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:]...)...))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user