MCPcopy Create free account
hub / github.com/carvel-dev/kapp-controller / NewGetCmd

Function NewGetCmd

cli/pkg/kctrl/cmd/app/get.go:35–50  ·  view source on GitHub ↗
(o *GetOptions, flagsFactory cmdcore.FlagsFactory)

Source from the content-addressed store, hash-verified

33}
34
35func NewGetCmd(o *GetOptions, flagsFactory cmdcore.FlagsFactory) *cobra.Command {
36 cmd := &cobra.Command{
37 Use: "get",
38 Aliases: []string{"g"},
39 Short: "Get details for app",
40 RunE: func(_ *cobra.Command, _ []string) error { return o.Run() },
41 Annotations: map[string]string{
42 cmdcore.AppManagementCommandsHelpGroup.Key: cmdcore.AppManagementCommandsHelpGroup.Value,
43 },
44 }
45
46 o.NamespaceFlags.Set(cmd, flagsFactory)
47 cmd.Flags().StringVarP(&o.Name, "app", "a", "", "Set app name (required)")
48
49 return cmd
50}
51
52func (o *GetOptions) Run() error {
53 if len(o.Name) == 0 {

Callers 1

NewKctrlCmdFunction · 0.92

Calls 2

RunMethod · 0.65
SetMethod · 0.45

Tested by

no test coverage detected