func main() { if err := cli.Root(root, cli.Tree(help), cli.Tree(child), ).Run(os.Args[1:]); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } }
func main() { cli.SetUsageStyle(cli.ManualStyle) // up-down, for left-right, use NormalStyle //NOTE: You can set any writer implements io.Writer // default writer is os.Stdout if err := cli.Root(root, cli.Tree(buildCmd), cli.Tree(installCmd), cli.Tree(publishCmd)).Run(os.Args[1:]); err != nil { fmt.Fprintln(os.Stderr, err) } fmt.Println("") }
func main() { if err := cli.Root(root, cli.Tree(daemon), ).Run(os.Args[1:]); err != nil { fmt.Fprintln(os.Stderr, err) } }
func main() { if err := cli.Root(root, cli.Tree(sub)).Run(os.Args[1:]); err != nil { fmt.Fprintln(os.Stderr, err) } fmt.Println("") }