Files
kustomize/cmd/config/cmds/example_test.go
2019-11-25 10:20:34 -08:00

21 lines
473 B
Go

// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package cmds_test
import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/cmd/config/cmds"
)
// ExampleNewConfigCommand demonstrates how to embed the config command as a command inside
// another group.
func ExampleNewConfigCommand() {
var root = &cobra.Command{
Use: "my-cmd",
Short: "My command.",
Long: `My command.`,
}
root.AddCommand(cmds.NewConfigCommand("my-cmd"))
}