github.com/rakutentech/cli@v6.12.5-0.20151006231303-24468b65536e+incompatible/plugin/rpc/fake_command/fake_command3.go (about) 1 package fake_command 2 3 import ( 4 "github.com/cloudfoundry/cli/cf/command_registry" 5 "github.com/cloudfoundry/cli/cf/requirements" 6 "github.com/cloudfoundry/cli/flags" 7 ) 8 9 type FakeCommand3 struct { 10 Data string 11 } 12 13 func init() { 14 command_registry.Register(FakeCommand3{Data: "FakeCommand3 data"}) 15 } 16 17 func (cmd FakeCommand3) MetaData() command_registry.CommandMetadata { 18 return command_registry.CommandMetadata{ 19 Name: "fake-non-codegangsta-command3", 20 Description: "Description for fake-command3", 21 Usage: "Usage of fake-command3", 22 } 23 } 24 25 func (cmd FakeCommand3) Requirements(_ requirements.Factory, _ flags.FlagContext) (reqs []requirements.Requirement, err error) { 26 return []requirements.Requirement{}, nil 27 } 28 29 func (cmd FakeCommand3) SetDependency(deps command_registry.Dependency, pluginCall bool) command_registry.Command { 30 return cmd 31 } 32 33 func (cmd FakeCommand3) Execute(c flags.FlagContext) { 34 panic("this is a test panic for cli_rpc_server_test (panic recovery)") 35 }