func initConfig() {
	var recoDir string
	if cfgFile != "" { // enable ability to specify config file via flag
		viper.SetConfigFile(cfgFile)
		recoDir = filepath.Dir(cfgFile)
	} else {
		recoDir = getConfigDir()
		if err := os.MkdirAll(recoDir, 0755); err != nil {
			exitWithError(err)
		}
	}

	viper.AddConfigPath(recoDir)
	viper.SetConfigName("reco") // name of config file (without extension)
	viper.AutomaticEnv()        // read in environment variables that match

	// If a config file is found, read it in.
	viper.ReadInConfig()

	// save config for other uses.
	viper.Set(reco.GlobalConfigDirKey, recoDir)

	// source directory
	if srcDir == "" {
		srcDir = getCurrentDir()
	}

	// local config dir
	configDir := filepath.Join(srcDir, ".reco")
	if err := os.MkdirAll(configDir, 0755); err != nil {
		exitWithError(err)
	}
	viper.Set(reco.ConfigDirKey, configDir)
}
// 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() {
	var recoDir string
	if cfgFile != "" { 
		viper.SetConfigFile(cfgFile)
		recoDir = filepath.Dir(cfgFile)
	} else {
		recoDir = getConfigDir()
		if err := os.MkdirAll(recoDir, 0755); err != nil {
			exitWithError(err)
		}
	}
	viper.AddConfigPath(recoDir)
	viper.SetConfigName("reco") 
	viper.AutomaticEnv()        
	viper.ReadInConfig()
	viper.Set(reco.GlobalConfigDirKey, recoDir)
	if srcDir == "" {
		srcDir = getCurrentDir()
	}
	configDir := filepath.Join(srcDir, ".reco")
	if err := os.MkdirAll(configDir, 0755); err != nil {
		exitWithError(err)
	}
	viper.Set(reco.ConfigDirKey, configDir)
}
func initConfig ( ) { var recoDir string if cfgFile != " " { viper . SetConfigFile ( cfgFile ) recoDir = filepath . Dir ( cfgFile ) } else { recoDir = getConfigDir ( ) if err := os . MkdirAll ( recoDir , 0755 ) ; err != nil { exitWithError ( err ) } } viper . AddConfigPath ( recoDir ) viper . SetConfigName ( " " ) viper . AutomaticEnv ( ) viper . ReadInConfig ( ) viper . Set ( reco . GlobalConfigDirKey , recoDir ) if srcDir == " " { srcDir = getCurrentDir ( ) } configDir := filepath . Join ( srcDir , " " ) if err := os . MkdirAll ( configDir , 0755 ) ; err != nil { exitWithError ( err ) } viper . Set ( reco . ConfigDirKey , configDir ) }
initConfig reads in config file and ENV variables if set.
initConfig reads in config file and ENV variables if set .
// enable ability to specify config file via flag // name of config file (without extension) // read in environment variables that match // If a config file is found, read it in. // save config for other uses. // source directory // local config dir