github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/integration/assets/test_plugin_with_command_overrides/test_plugin.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "os" 6 7 "code.cloudfoundry.org/cli/plugin" 8 ) 9 10 type TestPluginWithCommandOverrides struct { 11 } 12 13 func (c *TestPluginWithCommandOverrides) Run(cliConnection plugin.CliConnection, args []string) { 14 fmt.Println("How??? This should not even be allowed to run") 15 os.Exit(1) 16 } 17 18 func (c *TestPluginWithCommandOverrides) GetMetadata() plugin.PluginMetadata { 19 return plugin.PluginMetadata{ 20 Name: "CF-CLI-Command-Override-Integration-Test-Plugin", 21 Version: plugin.VersionType{ 22 Major: 1, 23 Minor: 2, 24 Build: 4, 25 }, 26 MinCliVersion: plugin.VersionType{ 27 Major: 5, 28 Minor: 0, 29 Build: 0, 30 }, 31 Commands: []plugin.Command{ 32 {Name: "push", Alias: "p"}, 33 }, 34 } 35 } 36 37 func uninstalling() { 38 } 39 40 func main() { 41 plugin.Start(new(TestPluginWithCommandOverrides)) 42 }