update on util and comments

This commit is contained in:
Jijie Wei
2020-05-29 16:23:10 -07:00
parent 4b5b0dfdce
commit e63b9ef825
3 changed files with 7 additions and 18 deletions

View File

@@ -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