1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-27 13:48:56 +08:00

30 lines
445 B
Go
Raw Normal View History

2013-12-02 14:50:02 -08:00
package main
import (
"fmt"
"github.com/gonuts/commander"
"github.com/gonuts/flag"
2014-04-01 19:20:38 -07:00
"os"
2013-12-02 14:50:02 -08:00
)
var g_cmd *commander.Command
2013-12-02 14:50:02 -08:00
func init() {
g_cmd = &commander.Command{
UsageLine: "gobot <command>",
Subcommands: []*commander.Command{
2013-12-02 14:50:02 -08:00
generate(),
},
Flag: *flag.NewFlagSet("gobot", flag.ExitOnError),
2013-12-02 14:50:02 -08:00
}
}
func main() {
err := g_cmd.Dispatch(os.Args[1:])
2013-12-02 14:50:02 -08:00
if err != nil {
fmt.Printf("**err**: %v\n", err)
os.Exit(1)
}
return
}