github.com/ali-iotechsys/cli@v20.10.0+incompatible/e2e/cli-plugins/plugins/badmeta/main.go (about) 1 package main 2 3 // This is not a real plugin, but just returns malformated metadata 4 // from the subcommand and otherwise exits with failure. 5 6 import ( 7 "fmt" 8 "os" 9 10 "github.com/docker/cli/cli-plugins/manager" 11 ) 12 13 func main() { 14 if len(os.Args) == 2 && os.Args[1] == manager.MetadataSubcommandName { 15 fmt.Println(`{invalid-json}`) 16 os.Exit(0) 17 } 18 os.Exit(1) 19 }