예제 #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()
}