Skip to content

Commit

Permalink
Use flags not persistent flags
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Nov 8, 2017
1 parent 61cbf22 commit 265ddad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ func AddFlags(v *viper.Viper, command *cobra.Command, inits ...func(*flag.FlagSe
for i := range inits {
inits[i](flagSet)
}
command.PersistentFlags().AddGoFlagSet(flagSet)
command.Flags().AddGoFlagSet(flagSet)

configureViper(v)
v.BindPFlags(command.PersistentFlags())
v.BindPFlags(command.Flags())
return v, command
}

Expand Down

0 comments on commit 265ddad

Please sign in to comment.