github.com/jghiloni/cli@v6.28.1-0.20170628223758-0ce05fe032a2+incompatible/command/v2/delete_route_command.go (about) 1 package v2 2 3 import ( 4 "os" 5 6 "code.cloudfoundry.org/cli/cf/cmd" 7 "code.cloudfoundry.org/cli/command" 8 "code.cloudfoundry.org/cli/command/flag" 9 ) 10 11 type DeleteRouteCommand struct { 12 RequiredArgs flag.Domain `positional-args:"yes"` 13 Force bool `short:"f" description:"Force deletion without confirmation"` 14 Hostname string `long:"hostname" short:"n" description:"Hostname used to identify the HTTP route"` 15 Path string `long:"path" description:"Path used to identify the HTTP route"` 16 Port int `long:"port" description:"Port used to identify the TCP route"` 17 usage interface{} `usage:"Delete an HTTP route:\n CF_NAME delete-route DOMAIN [--hostname HOSTNAME] [--path PATH] [-f]\n\n Delete a TCP route:\n CF_NAME delete-route DOMAIN --port PORT [-f]\n\nEXAMPLES:\n CF_NAME delete-route example.com # example.com\n CF_NAME delete-route example.com --hostname myhost # myhost.example.com\n CF_NAME delete-route example.com --hostname myhost --path foo # myhost.example.com/foo\n CF_NAME delete-route example.com --port 5000 # example.com:5000"` 18 relatedCommands interface{} `related_commands:"delete-orphaned-routes, routes, unmap-route"` 19 } 20 21 func (_ DeleteRouteCommand) Setup(config command.Config, ui command.UI) error { 22 return nil 23 } 24 25 func (_ DeleteRouteCommand) Execute(args []string) error { 26 cmd.Main(os.Getenv("CF_TRACE"), os.Args) 27 return nil 28 }