コード例 #1
0
ファイル: brooklyn.go プロジェクト: burkechris/brooklyn-cli
func main() {
	config := io.GetConfig()
	target, username, password := getNetworkCredentialsFromConfig(config.Map)
	//target, username, password := "******", "brooklyn", "Sns4Hh9j7l"
	network := net.NewNetwork(target, username, password)
	cmdFactory := command_factory.NewFactory(network, config)
	cmdRunner := command_runner.NewRunner(cmdFactory)
	metaDatas := cmdFactory.CommandMetadatas()
	theApp := app.NewApp(filepath.Base(os.Args[0]), cmdRunner, metaDatas...)
	theApp.Run(os.Args)
}
コード例 #2
0
ファイル: brooklyn.go プロジェクト: andreaturli/brooklyn-cli
func main() {
	config := io.GetConfig()
	target, username, password := getNetworkCredentialsFromConfig(config.Map)
	//target, username, password := "******", "brooklyn", "Sns4Hh9j7l"
	network := net.NewNetwork(target, username, password)
	cmdFactory := command_factory.NewFactory(network, config)

	args, scope := scope.ScopeArguments(os.Args)
	cmdRunner := command_runner.NewRunner(scope, cmdFactory)
	metaDatas := cmdFactory.CommandMetadatas()
	theApp := app.NewApp(filepath.Base(args[0]), cmdRunner, metaDatas...)
	if err := theApp.Run(args); nil != err {
		error_handler.ErrorExit(err)
	}
}