命令行程序基础框架
func main(){
var app=cli.New(cli.WithVersion("0.1.0"))
app.Start()
}
//Action .
func list(c *cli.Context) (err error) {
//do something...
return nil
}
func init() {
cmds.Register(
cli.Command{
Name: "ls",
Usage: "列出所有子节点",
Action: list,
})
}