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