コード例 #1
0
ファイル: basic_plugin.go プロジェクト: fujitsu-cf/cli
// Unlike most Go programs, the `Main()` function will not be used to run all of the
// commands provided in your plugin. Main will be used to initialize the plugin
// process, as well as any dependencies you might require for your
// plugin.
func main() {
	// Any initialization for your plugin can be handled here
	//
	// Note: to run the plugin.Start method, we pass in a pointer to the struct
	// implementing the interface defined at "code.cloudfoundry.org/cli/plugin/plugin.go"
	//
	// Note: The plugin's main() method is invoked at install time to collect
	// metadata. The plugin will exit 0 and the Run([]string) method will not be
	// invoked.
	plugin.Start(new(BasicPlugin))
	// Plugin code should be written in the Run([]string) method,
	// ensuring the plugin environment is bootstrapped.
}
コード例 #2
0
func main() {
	// T needs to point to a translate func, otherwise cf internals blow up
	i18n.T, _ = go_i18n.Tfunc("")

	p := CfPlugin{
		Deployer: &BlueGreenDeploy{
			ErrorFunc: func(message string, err error) {
				fmt.Printf("%v - %v\n", message, err)
				os.Exit(1)
			},
			Out: os.Stdout,
		},
	}

	plugin.Start(&p)
}
コード例 #3
0
ファイル: v3.go プロジェクト: cloudfoundry/v3-cli-plugin
func main() {
	plugin.Start(new(V3Plugin))
}
コード例 #4
0
ファイル: multiple_commands.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(MultiCmd))
}
コード例 #5
0
ファイル: call_cli_cmd.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(CliCmd))
}
コード例 #6
0
ファイル: test_with_orgs.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(TestWithOrgs))
}
コード例 #7
0
ファイル: echo.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(PluginDemonstratingParams))
}
コード例 #8
0
ファイル: input.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(Input))
}
コード例 #9
0
ファイル: alias_conflicts.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(AliasConflicts))
}
コード例 #10
0
ファイル: panics.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(Panics))
}
コード例 #11
0
func main() {
	plugin.Start(new(DemoCmd))
}
コード例 #12
0
ファイル: empty_plugin.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(EmptyPlugin))
}
コード例 #13
0
ファイル: test_with_help.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(TestWithHelp))
}
コード例 #14
0
ファイル: call_core_cmd.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(CoreCmd))
}
コード例 #15
0
ファイル: test_1.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(Test1))
}
コード例 #16
0
ファイル: my_say.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(MySay))
}
コード例 #17
0
func main() {
	plugin.Start(new(TestWithOrgsShortName))
}
コード例 #18
0
ファイル: test_with_push.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(TestWithPush))
}
コード例 #19
0
ファイル: interactive.go プロジェクト: fujitsu-cf/cli
func main() {
	plugin.Start(new(Interactive))
}