Exemplo n.º 1
0
Arquivo: main.go Projeto: jcw/flow
func main() {
	flag.Parse()

	err := flow.AddToRegistry(*setupFile)
	if err != nil && !*verbose {
		glog.Fatal(err)
	}

	if *verbose {
		fmt.Println("Flow", flow.Version, "\n")
		flow.PrintRegistry()
		fmt.Println("\nDocumentation at http://godoc.org/github.com/jcw/flow")
	} else {
		glog.Infof("Flow %s - starting, registry size %d",
			flow.Version, len(flow.Registry))
		if factory, ok := flow.Registry[*appMain]; ok {
			factory().Run()
		} else {
			glog.Fatalln(*appMain, "not found in:", *setupFile)
		}
		glog.Infof("Flow %s -, normal exit", flow.Version)
	}
}
Exemplo n.º 2
0
Arquivo: all.go Projeto: x4rMa/jeebus
func (g *infoCmd) Run() {
	fmt.Println("Registered gadgets and circuits:\n")
	flow.PrintRegistry()
	fmt.Println()
}