示例#1
0
func main() {
	// Registers authCmd to handle `program [args...] auth [subcommand-args...]`
	command.On("auth", "Allow you to authorize and configure project settings.", &authCmd{}, []string{"project"})
	// Registers startCmd to handle `program [args...] start [subcommand-args...]`
	command.On("start", "Starts the proxy server.", &startCmd{}, []string{})
	command.ParseAndRun()
}
示例#2
0
文件: main.go 项目: haruyama/drive
func main() {
	command.On("init", descInit, &initCmd{}, []string{})
	command.On("pull", descPull, &pullCmd{}, []string{})
	command.On("push", descPush, &pushCmd{}, []string{})
	command.On("diff", descDiff, &diffCmd{}, []string{})
	command.On("pub", descPublish, &publishCmd{}, []string{})
	command.ParseAndRun()
}