()
| 33 | ) |
| 34 | |
| 35 | func PortCommand() *cobra.Command { |
| 36 | var cmd = &cobra.Command{ |
| 37 | Use: "port [flags] CONTAINER [PRIVATE_PORT[/PROTO]]", |
| 38 | Args: cobra.RangeArgs(1, 2), |
| 39 | Short: "List port mappings or a specific mapping for the container", |
| 40 | RunE: portAction, |
| 41 | ValidArgsFunction: portShellComplete, |
| 42 | SilenceUsage: true, |
| 43 | SilenceErrors: true, |
| 44 | } |
| 45 | return cmd |
| 46 | } |
| 47 | |
| 48 | func portAction(cmd *cobra.Command, args []string) error { |
| 49 | globalOptions, err := helpers.ProcessRootCmdFlags(cmd) |