mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-17 09:49:13 +00:00
update on util and comments
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
|
||||
"github.com/go-errors/errors"
|
||||
"github.com/spf13/cobra"
|
||||
flag "github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
// parseFieldPath parse a flag value into a field path
|
||||
@@ -40,16 +39,6 @@ func parseFieldPath(path string) ([]string, error) {
|
||||
return newParts, nil
|
||||
}
|
||||
|
||||
func isFlagSet(name string, c *cobra.Command) bool {
|
||||
set := false
|
||||
c.Flags().Visit(func(f *flag.Flag) {
|
||||
if f.Name == name {
|
||||
set = true
|
||||
}
|
||||
})
|
||||
return set
|
||||
}
|
||||
|
||||
func handleError(c *cobra.Command, err error) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user