cmd: Replace flagChanged with pflag.FlagSet.Changed

This commit is contained in:
Albert Nigmatzianov
2017-05-24 10:51:48 +02:00
parent 0a40cb43ea
commit 421a46947a
3 changed files with 8 additions and 16 deletions

View File

@@ -98,11 +98,11 @@ func NewContent(cmd *cobra.Command, args []string) error {
return err
}
if flagChanged(cmd.Flags(), "format") {
if cmd.Flags().Changed("format") {
c.Set("metaDataFormat", configFormat)
}
if flagChanged(cmd.Flags(), "editor") {
if cmd.Flags().Changed("editor") {
c.Set("newContentEditor", contentEditor)
}