Ejemplo n.º 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()
}
Ejemplo n.º 2
0
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()
}