forked from cloudfoundry-community/cloudfoundry-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_plugin.go
42 lines (35 loc) · 788 Bytes
/
test_plugin.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 main
import (
"fmt"
"os"
"code.cloudfoundry.org/cli/plugin"
)
type TestPluginWithCommandOverrides struct {
}
func (c *TestPluginWithCommandOverrides) Run(cliConnection plugin.CliConnection, args []string) {
fmt.Println("How??? This should not even be allowed to run")
os.Exit(1)
}
func (c *TestPluginWithCommandOverrides) GetMetadata() plugin.PluginMetadata {
return plugin.PluginMetadata{
Name: "CF-CLI-Command-Override-Integration-Test-Plugin",
Version: plugin.VersionType{
Major: 1,
Minor: 2,
Build: 4,
},
MinCliVersion: plugin.VersionType{
Major: 5,
Minor: 0,
Build: 0,
},
Commands: []plugin.Command{
{Name: "push", Alias: "p"},
},
}
}
func uninstalling() {
}
func main() {
plugin.Start(new(TestPluginWithCommandOverrides))
}