forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_command4.go
42 lines (33 loc) · 1022 Bytes
/
fake_command4.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
39
40
41
42
package fakecommand
import (
"errors"
"code.cloudfoundry.org/cli/cf/commandregistry"
"code.cloudfoundry.org/cli/cf/flags"
"code.cloudfoundry.org/cli/cf/requirements"
)
var ErrFakeCommand4 = errors.New("ZOMG command errored")
type FakeCommand4 struct {
Data string
}
func init() {
commandregistry.Register(FakeCommand4{Data: "FakeCommand4 data"})
}
func (cmd FakeCommand4) MetaData() commandregistry.CommandMetadata {
return commandregistry.CommandMetadata{
Name: "fake-command4",
Description: "Description for fake-command4 will error on run",
Usage: []string{
"Usage of fake-command4",
},
}
}
func (cmd FakeCommand4) Requirements(_ requirements.Factory, _ flags.FlagContext) ([]requirements.Requirement, error) {
reqs := []requirements.Requirement{}
return reqs, nil
}
func (cmd FakeCommand4) SetDependency(deps commandregistry.Dependency, pluginCall bool) commandregistry.Command {
return cmd
}
func (cmd FakeCommand4) Execute(c flags.FlagContext) error {
return ErrFakeCommand4
}