MCPcopy Index your code
hub / github.com/devspace-sh/devspace / newCommandsCmd

Function newCommandsCmd

cmd/list/commands.go:21–41  ·  view source on GitHub ↗
(f factory.Factory, globalFlags *flags.GlobalFlags)

Source from the content-addressed store, hash-verified

19}
20
21func newCommandsCmd(f factory.Factory, globalFlags *flags.GlobalFlags) *cobra.Command {
22 cmd := &commandsCmd{GlobalFlags: globalFlags}
23
24 commandsCmd := &cobra.Command{
25 Use: "commands",
26 Short: "Lists all custom DevSpace commands",
27 Long: `
28#######################################################
29############## devspace list commands #################
30#######################################################
31Lists all DevSpace custom commands defined in the
32devspace.yaml
33#######################################################
34 `,
35 Args: cobra.NoArgs,
36 RunE: func(cobraCmd *cobra.Command, args []string) error {
37 return cmd.RunListCommands(f, cobraCmd, args)
38 }}
39
40 return commandsCmd
41}
42
43// RunListCommands runs the list command logic
44func (cmd *commandsCmd) RunListCommands(f factory.Factory, cobraCmd *cobra.Command, args []string) error {

Callers 1

NewListCmdFunction · 0.85

Calls 1

RunListCommandsMethod · 0.95

Tested by

no test coverage detected