MCPcopy Create free account
hub / github.com/devspace-sh/devspace / newVarsCmd

Function newVarsCmd

cmd/list/vars.go:23–44  ·  view source on GitHub ↗
(f factory.Factory, globalFlags *flags.GlobalFlags)

Source from the content-addressed store, hash-verified

21}
22
23func newVarsCmd(f factory.Factory, globalFlags *flags.GlobalFlags) *cobra.Command {
24 cmd := &varsCmd{GlobalFlags: globalFlags}
25
26 varsCmd := &cobra.Command{
27 Use: "vars",
28 Short: "Lists the vars in the active config",
29 Long: `
30#######################################################
31############### devspace list vars ####################
32#######################################################
33Lists the defined vars in the devspace config with their
34values
35#######################################################
36 `,
37 Args: cobra.NoArgs,
38 RunE: func(cobraCmd *cobra.Command, args []string) error {
39 return cmd.RunListVars(f, cobraCmd, args)
40 }}
41
42 varsCmd.Flags().StringVarP(&cmd.Output, "output", "o", "", "The output format of the command. Can be either empty, keyvalue or json")
43 return varsCmd
44}
45
46// RunListVars runs the list vars command logic
47func (cmd *varsCmd) RunListVars(f factory.Factory, cobraCmd *cobra.Command, args []string) error {

Callers 1

NewListCmdFunction · 0.70

Calls 1

RunListVarsMethod · 0.95

Tested by

no test coverage detected