From b80588d523ec50c7fee20218426cf2ff70920f06 Mon Sep 17 00:00:00 2001 From: Gregoire Mahe <31134503+gregoiremahe@users.noreply.github.com> Date: Mon, 5 Aug 2019 17:56:17 +0200 Subject: [PATCH] fix undefined cfgFile in documentation (#924) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1c4d6bc..649e2e2 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)")