| 1 | // Copyright 2019 The Kubernetes Authors. |
| 2 | // SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| 4 | package configcobra |
| 5 | |
| 6 | import ( |
| 7 | "github.com/spf13/cobra" |
| 8 | "sigs.k8s.io/kustomize/cmd/config/internal/commands" |
| 9 | ) |
| 10 | |
| 11 | func GetCfg(name string) *cobra.Command { |
| 12 | cmd := &cobra.Command{ |
| 13 | Use: "cfg", |
| 14 | Short: "Commands for reading and writing configuration", |
| 15 | } |
| 16 | |
| 17 | cmd.AddCommand(commands.CatCommand(name)) |
| 18 | cmd.AddCommand(commands.CountCommand(name)) |
| 19 | cmd.AddCommand(commands.GrepCommand(name)) |
| 20 | cmd.AddCommand(commands.TreeCommand(name)) |
| 21 | |
| 22 | return cmd |
| 23 | } |