github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/fixtures/plugins/alias_conflicts.go (about) 1 // +build !V7 2 3 package main 4 5 import ( 6 "fmt" 7 8 "code.cloudfoundry.org/cli/plugin" 9 ) 10 11 type AliasConflicts struct { 12 } 13 14 func (c *AliasConflicts) Run(cliConnection plugin.CliConnection, args []string) { 15 if args[0] == "conflict-cmd" || args[0] == "conflict-alias" { 16 cmd() 17 } 18 } 19 20 func (c *AliasConflicts) GetMetadata() plugin.PluginMetadata { 21 return plugin.PluginMetadata{ 22 Name: "AliasConflicts", 23 Commands: []plugin.Command{ 24 { 25 Name: "conflict-cmd", 26 Alias: "conflict-alias", 27 HelpText: "help text for AliasConflicts", 28 }, 29 }, 30 } 31 } 32 33 func cmd() { 34 fmt.Println("You called AliasConflicts") 35 } 36 37 func main() { 38 plugin.Start(new(AliasConflicts)) 39 }