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
24
cmd/config/configcobra/fn.go
Normal file
24
cmd/config/configcobra/fn.go
Normal file
@@ -0,0 +1,24 @@
|
||||
// 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 GetFn(name string) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "fn",
|
||||
Short: "Commands for running functions against configuration.",
|
||||
}
|
||||
|
||||
cmd.AddCommand(commands.RunCommand(name))
|
||||
cmd.AddCommand(commands.SinkCommand(name))
|
||||
cmd.AddCommand(commands.SourceCommand(name))
|
||||
cmd.AddCommand(commands.WrapCommand())
|
||||
cmd.AddCommand(commands.XArgsCommand())
|
||||
|
||||
return cmd
|
||||
}
|
||||
Reference in New Issue
Block a user