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

Function NewPauseCmd

cli/pkg/kctrl/cmd/app/pause.go:34–48  ·  view source on GitHub ↗
(o *PauseOptions, flagsFactory cmdcore.FlagsFactory)

Source from the content-addressed store, hash-verified

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

Callers 1

NewKctrlCmdFunction · 0.92

Calls 2

RunMethod · 0.65
SetMethod · 0.45

Tested by

no test coverage detected