示例#1
0
// 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.
}
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
func main() {
	plugin.Start(new(V3Plugin))
}
示例#4
0
func main() {
	plugin.Start(new(MultiCmd))
}
示例#5
0
func main() {
	plugin.Start(new(CliCmd))
}
示例#6
0
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
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
func main() {
	plugin.Start(new(EmptyPlugin))
}
示例#13
0
func main() {
	plugin.Start(new(TestWithHelp))
}
示例#14
0
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
func main() {
	plugin.Start(new(TestWithPush))
}
示例#19
0
func main() {
	plugin.Start(new(Interactive))
}