Esempio n. 1
0
func main() {
	fh := gofh.Init()
	fh.HandleCommand("init", initProject)
	fh.HandleCommand("deploy", deployProject)
	fh.SetDefaultHandler(showUsage)
	fh.Parse(os.Args[1:])
}
Esempio n. 2
0
File: main.go Progetto: romanoff/ahc
// Ahc command line tool
func main() {
	flagHandler := gofh.Init()
	serverOptions := []*gofh.Option{
		&gofh.Option{Name: "port", Boolean: false},
		&gofh.Option{Name: "dev", Boolean: true},
	}
	flagHandler.HandleCommandWithOptions("server", serverOptions, StartServer)
	flagHandler.HandleCommand("test", TestComponents)
	flagHandler.Parse(os.Args[1:])
}
Esempio n. 3
0
File: main.go Progetto: romanoff/dk
func main() {
	config, _ = ReadConfig(".")
	fh := gofh.Init()
	fh.HandleCommand("init :source", CreateConfig)
	fh.HandleCommand("create :name", CreateDump)
	fh.HandleCommand("apply :name", ApplyDump)
	fh.HandleCommand("rm :name", RemoveDump)
	fh.HandleCommand("list", ListDumps)
	fh.HandleCommand("list :remote", ListRemoteDumps)
	fh.HandleCommand("push :remote :name", PushDump)
	fh.HandleCommand("pull :remote :name", PullDump)
	fh.HandleCommand("rm :remote :name", RemoveRemoteDump)
	fh.SetDefaultHandler(ShowUsage)
	fh.Parse(os.Args[1:])
}