mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
fix undefined cfgFile in documentation (#924)
This commit is contained in:
parent
993cc5372a
commit
b80588d523
1 changed files with 2 additions and 0 deletions
|
@ -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)")
|
||||
|
|
Loading…
Reference in a new issue