func main() { logOut, _ := os.OpenFile("/tmp/firehose.stdout.log", os.O_WRONLY|os.O_APPEND|os.O_SYNC, 0755) logErr, _ := os.OpenFile("/tmp/firehose.stderr.log", os.O_WRONLY|os.O_APPEND|os.O_SYNC, 0755) os.Stdout = logOut os.Stderr = logErr // if err != nil { // t.Fatalf("error opening file: %v", err) // } defer logOut.Close() defer logErr.Close() // 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 "github.com/cloudfoundry/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. fmt.Print("Starting plugin\n") plugin.Start(new(FirehoseInspector)) // Plugin code should be written in the Run([]string) method, // ensuring the plugin environment is bootstrapped. }
/* * 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: 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. // About debug Locally: // The plugin interface hides panics from stdout, so in order to get panic info, // you can run this plugin outside of the plugin architecture by setting debuglocally = true. // example usage for local run: go run main.go download APP_NAME --overwrite 2> err.txt // note the lack of 'cf' debugLocally := false if debugLocally { var run DownloadPlugin run.Run(nil, os.Args[1:]) } else { plugin.Start(new(DownloadPlugin)) } // Plugin code should be written in the Run([]string) method, // ensuring the plugin environment is bootstrapped. }
/* * 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 "github.com/cloudfoundry/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) }
/* * 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() { plugin.Start(new(FastPushPlugin)) }
func main() { plugin.Start(new(IpQuery)) }
func main() { plugin.Start(new(TestWithOrgs)) }
func main() { plugin.Start(new(MultiCmd)) }
func main() { plugin.Start(new(UsageReportCmd)) }
func main() { plugin.Start(new(AppEnv)) }
func main() { sshPlugin := &SSHPlugin{} plugin.Start(sshPlugin) }
func main() { plugin.Start(new(dcp.DeployCloudPlugin)) }
func main() { plugin.Start(new(FirehoseStatsCmd)) }
func main() { plugin.Start(&OpenPlugin{}) }
func main() { plugin.Start(new(Test2)) }
func main() { plugin.Start(new(DiegoEnabler)) }
func main() { plugin.Start(new(TestWithPush)) }
func main() { plugin.Start(new(TestWithHelp)) }
func main() { plugin.Start(new(Wildcard)) //plugin.Start(newWildcard()) }
func main() { plugin.Start(new(EmptyPlugin)) }
func main() { plugin.Start(new(CLI_Recorder)) }
func main() { plugin.Start(new(DiegoMigrationCmd)) }
func main() { plugin.Start(&watch.Plugin{ Session: &scp.Session{}, UI: terminal.NewUI(os.Stdin, terminal.NewTeePrinter()), }) }
func main() { plugin.Start(new(HelloWorld)) }
func main() { plugin.Start(new(DemoCmd)) }
func main() { plugin.Start(new(BuildpackManager)) }
func main() { plugin.Start(new(CopyEnv)) }
func main() { plugin.Start(new(NozzlerCmd)) }
func main() { plugin.Start(&AutopilotPlugin{}) }
func main() { plugin.Start(new(MupsPlugin)) }