fix undefined cfgFile in documentation (#924)

This commit is contained in:
Gregoire Mahe 2019-08-05 17:56:17 +02:00 committed by Joshua Harshman
parent 993cc5372a
commit b80588d523
1 changed files with 2 additions and 0 deletions

View File

@ -218,6 +218,8 @@ import (
"github.com/spf13/viper" "github.com/spf13/viper"
) )
var cfgFile string
func init() { func init() {
cobra.OnInitialize(initConfig) cobra.OnInitialize(initConfig)
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)") rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)")