summaryrefslogtreecommitdiffstats
path: root/commands/new.go
diff options
context:
space:
mode:
authorAlbert Nigmatzianov <albertnigma@gmail.com>2017-05-24 10:51:48 +0200
committerAlbert Nigmatzianov <albertnigma@gmail.com>2017-05-24 10:51:51 +0200
commit421a46947ab5c889185422c864a9abbb7d4e2e04 (patch)
tree5344c55773190ef94bec793fd564898c6490550b /commands/new.go
parent0a40cb43eaa88c18e94cc5ffdb65f9047ef6265c (diff)
cmd: Replace flagChanged with pflag.FlagSet.Changed
Diffstat (limited to 'commands/new.go')
-rw-r--r--commands/new.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/new.go b/commands/new.go
index a4fe6021e..d8548ebdc 100644
--- a/commands/new.go
+++ b/commands/new.go
@@ -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)
}