mirror of
https://github.com/spf13/cobra
synced 2025-05-05 21:07:24 +00:00
go fmt
This commit is contained in:
parent
c888c97288
commit
1bffbc43ed
2 changed files with 5 additions and 5 deletions
|
@ -210,8 +210,8 @@ func initConfig() {
|
||||||
}
|
}
|
||||||
|
|
||||||
viper.SetConfigName(".{{ .appName }}") // name of config file (without extension)
|
viper.SetConfigName(".{{ .appName }}") // name of config file (without extension)
|
||||||
viper.AddConfigPath(os.Getenv("HOME")) // adding home directory as first search path
|
viper.AddConfigPath(os.Getenv("HOME")) // adding home directory as first search path
|
||||||
viper.AutomaticEnv() // read in environment variables that match
|
viper.AutomaticEnv() // read in environment variables that match
|
||||||
|
|
||||||
// If a config file is found, read it in.
|
// If a config file is found, read it in.
|
||||||
if err := viper.ReadInConfig(); err == nil {
|
if err := viper.ReadInConfig(); err == nil {
|
||||||
|
|
|
@ -61,9 +61,9 @@ func initConfig() {
|
||||||
viper.SetConfigFile(cfgFile)
|
viper.SetConfigFile(cfgFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
viper.SetConfigName(".cobra") // name of config file (without extension)
|
viper.SetConfigName(".cobra") // name of config file (without extension)
|
||||||
viper.AddConfigPath(os.Getenv("HOME")) // adding home directory as first search path
|
viper.AddConfigPath(os.Getenv("HOME")) // adding home directory as first search path
|
||||||
viper.AutomaticEnv() // read in environment variables that match
|
viper.AutomaticEnv() // read in environment variables that match
|
||||||
|
|
||||||
// If a config file is found, read it in.
|
// If a config file is found, read it in.
|
||||||
if err := viper.ReadInConfig(); err == nil {
|
if err := viper.ReadInConfig(); err == nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue