diff --git a/src/ice.go b/src/ice.go new file mode 100644 index 00000000..a8552c57 --- /dev/null +++ b/src/ice.go @@ -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") +} diff --git a/src/relay.go b/src/relay.go index a0d32bc8..3c5e7fdf 100644 --- a/src/relay.go +++ b/src/relay.go @@ -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:]...)...)) }