func initConfig() {
	// Override our config with any matching environment variables
	viper.AutomaticEnv()

	// Set environment variable prefix, eg: VAULT_UTIL_AWS_REGION
	viper.SetEnvPrefix("vault_util")

	// Load the config file
	settingsFile := ciutils.SettingsPath("vault-util.toml")
	settingsFileExists, err := fs.Exists(settingsFile)
	if err != nil {
		log.Fatal(err)
	}

	if settingsFileExists {
		viper.SetConfigFile(settingsFile)

		if err := viper.ReadInConfig(); err != nil {
			log.Fatal(err)
		}
	}

	// Override our config with any matching environment variables
	viper.AutomaticEnv()
}
// initConfig reads in config file and ENV variables if set.
initConfig reads in config file and ENV variables if set.
// initConfig reads in config file and ENV variables if set .
func initConfig() {
	viper.AutomaticEnv()
	viper.SetEnvPrefix("vault_util")
	settingsFile := ciutils.SettingsPath("vault-util.toml")
	settingsFileExists, err := fs.Exists(settingsFile)
	if err != nil {
		log.Fatal(err)
	}
	if settingsFileExists {
		viper.SetConfigFile(settingsFile)
		if err := viper.ReadInConfig(); err != nil {
			log.Fatal(err)
		}
	}
	viper.AutomaticEnv()
}
func initConfig ( ) { viper . AutomaticEnv ( ) viper . SetEnvPrefix ( " " ) settingsFile := ciutils . SettingsPath ( " " ) settingsFileExists , err := fs . Exists ( settingsFile ) if err != nil { log . Fatal ( err ) } if settingsFileExists { viper . SetConfigFile ( settingsFile ) if err := viper . ReadInConfig ( ) ; err != nil { log . Fatal ( err ) } } viper . AutomaticEnv ( ) }
initConfig reads in config file and ENV variables if set.
initConfig reads in config file and ENV variables if set .
// Override our config with any matching environment variables // Set environment variable prefix, eg: VAULT_UTIL_AWS_REGION // Load the config file // Override our config with any matching environment variables