mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Refactor kustomize config command structure
- Create cfg, fn, live parent commands
This commit is contained in:
committed by
Phillip Wittrock
parent
73157c7141
commit
701c217791
32
cmd/config/configcobra/cfg.go
Normal file
32
cmd/config/configcobra/cfg.go
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright 2019 The Kubernetes Authors.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package configcobra
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"sigs.k8s.io/kustomize/cmd/config/internal/commands"
|
||||
)
|
||||
|
||||
func GetCfg(name string) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "cfg",
|
||||
Short: "Commands for reading and writing configuration.",
|
||||
}
|
||||
|
||||
cmd.AddCommand(commands.AnnotateCommand(name))
|
||||
cmd.AddCommand(commands.CatCommand(name))
|
||||
cmd.AddCommand(commands.CountCommand(name))
|
||||
cmd.AddCommand(commands.CreateSetterCommand(name))
|
||||
cmd.AddCommand(commands.CreateSubstitutionCommand(name))
|
||||
cmd.AddCommand(commands.FmtCommand(name))
|
||||
cmd.AddCommand(commands.GrepCommand(name))
|
||||
cmd.AddCommand(commands.InitCommand(name))
|
||||
cmd.AddCommand(commands.ListSettersCommand(name))
|
||||
cmd.AddCommand(commands.MergeCommand(name))
|
||||
cmd.AddCommand(commands.Merge3Command(name))
|
||||
cmd.AddCommand(commands.SetCommand(name))
|
||||
cmd.AddCommand(commands.TreeCommand(name))
|
||||
|
||||
return cmd
|
||||
}
|
||||
Reference in New Issue
Block a user