mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-10 08:20:59 +00:00
Disable alpha kustomize commands by default.
- enable alpha commands with env KUSTOMIZE_SHOW_ALPHA_COMMANDS=true
This commit is contained in:
@@ -4,13 +4,18 @@
|
||||
package cmds_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"sigs.k8s.io/kustomize/cmd/config/cmds"
|
||||
"sigs.k8s.io/kustomize/kyaml/commandutil"
|
||||
)
|
||||
|
||||
// ExampleNewConfigCommand demonstrates how to embed the config command as a command inside
|
||||
// another group.
|
||||
func ExampleNewConfigCommand() {
|
||||
// enable the config commands
|
||||
os.Setenv(commandutil.EnableAlphaCommmandsEnvName, "true")
|
||||
var root = &cobra.Command{
|
||||
Use: "my-cmd",
|
||||
Short: "My command.",
|
||||
|
||||
Reference in New Issue
Block a user