diff --git a/README.md b/README.md index 1c4d6bc5..649e2e2f 100644 --- a/README.md +++ b/README.md @@ -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)")