Skip to content

Commit

Permalink
fix undefined cfgFile in documentation (#924)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregoiremahe authored and jharshman committed Aug 5, 2019
1 parent 993cc53 commit b80588d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ import (
"github.com/spf13/viper"
)

var cfgFile string

func init() {
cobra.OnInitialize(initConfig)
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)")
Expand Down

0 comments on commit b80588d

Please sign in to comment.