MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / NewCmd

Function NewCmd

internal/cmd/manager/pgbouncer/cmd.go:34–50  ·  view source on GitHub ↗

NewCmd creates the "instance" command

()

Source from the content-addressed store, hash-verified

32
33// NewCmd creates the "instance" command
34func NewCmd() *cobra.Command {
35 cmd := &cobra.Command{
36 Use: "pgbouncer",
37 Short: "pgbouncer management subfeatures",
38 SilenceErrors: true,
39 PersistentPreRunE: func(_ *cobra.Command, _ []string) error {
40 return os.MkdirAll(postgres.TemporaryDirectory, 0o1777) //nolint:gosec
41 },
42 RunE: func(_ *cobra.Command, _ []string) error {
43 return fmt.Errorf("missing subcommand")
44 },
45 }
46
47 cmd.AddCommand(run.NewCmd())
48
49 return cmd
50}

Callers 1

mainFunction · 0.92

Calls 1

NewCmdFunction · 0.92

Tested by

no test coverage detected