(f factory.Factory, globalFlags *flags.GlobalFlags)
| 26 | } |
| 27 | |
| 28 | func newPortsCmd(f factory.Factory, globalFlags *flags.GlobalFlags) *cobra.Command { |
| 29 | cmd := &portsCmd{GlobalFlags: globalFlags} |
| 30 | |
| 31 | portsCmd := &cobra.Command{ |
| 32 | Use: "ports", |
| 33 | Short: "Lists port forwarding configurations", |
| 34 | Long: ` |
| 35 | ####################################################### |
| 36 | ############### devspace list ports ################### |
| 37 | ####################################################### |
| 38 | Lists the port forwarding configurations |
| 39 | ####################################################### |
| 40 | `, |
| 41 | Args: cobra.NoArgs, |
| 42 | RunE: func(cobraCmd *cobra.Command, args []string) error { |
| 43 | return cmd.RunListPort(f, cobraCmd, args) |
| 44 | }} |
| 45 | |
| 46 | portsCmd.Flags().StringVarP(&cmd.Output, "output", "o", "", "The output format of the command. Can be either empty or json") |
| 47 | return portsCmd |
| 48 | } |
| 49 | |
| 50 | // RunListPort runs the list port command logic |
| 51 | func (cmd *portsCmd) RunListPort(f factory.Factory, cobraCmd *cobra.Command, args []string) error { |
no test coverage detected