github.com/loafoe/cli@v7.1.0+incompatible/integration/assets/test_plugin_fails_metadata/test_plugin.go (about) 1 package main 2 3 import ( 4 "os" 5 6 "code.cloudfoundry.org/cli/plugin" 7 ) 8 9 type TestPluginFailsMetadata struct{} 10 11 func (_ *TestPluginFailsMetadata) Run(cliConnection plugin.CliConnection, args []string) { 12 } 13 14 func (c *TestPluginFailsMetadata) GetMetadata() plugin.PluginMetadata { 15 os.Exit(51) 16 return plugin.PluginMetadata{ 17 Name: "CF-CLI-Panic-Integration-Test-Plugin", 18 Version: plugin.VersionType{ 19 Major: 1, 20 Minor: 2, 21 Build: 4, 22 }, 23 MinCliVersion: plugin.VersionType{ 24 Major: 5, 25 Minor: 0, 26 Build: 0, 27 }, 28 Commands: []plugin.Command{ 29 {Name: "freak-out"}, 30 }, 31 } 32 } 33 34 func uninstalling() { 35 } 36 37 func main() { 38 plugin.Start(new(TestPluginFailsMetadata)) 39 }