forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_command3.go
38 lines (31 loc) · 966 Bytes
/
fake_command3.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package fakecommand
import (
"github.com/cloudfoundry/cli/cf/commandregistry"
"github.com/cloudfoundry/cli/cf/requirements"
"github.com/cloudfoundry/cli/flags"
)
type FakeCommand3 struct {
Data string
}
func init() {
commandregistry.Register(FakeCommand3{Data: "FakeCommand3 data"})
}
func (cmd FakeCommand3) MetaData() commandregistry.CommandMetadata {
return commandregistry.CommandMetadata{
Name: "fake-command3",
Description: "Description for fake-command3",
Usage: []string{
"Usage of fake-command3",
},
}
}
func (cmd FakeCommand3) Requirements(_ requirements.Factory, _ flags.FlagContext) []requirements.Requirement {
reqs := []requirements.Requirement{}
return reqs
}
func (cmd FakeCommand3) SetDependency(deps commandregistry.Dependency, pluginCall bool) commandregistry.Command {
return cmd
}
func (cmd FakeCommand3) Execute(c flags.FlagContext) {
panic("this is a test panic for cli_rpc_server_test (panic recovery)")
}