func initConfig() {
	if cfgFile != "" {
		// Use config file from the flag.
		viper.SetConfigFile(cfgFile)
	} else {
		// Find home directory.
		home, err := os.UserHomeDir()
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}

		// Search config in home directory with name ".logics" (without extension).
		viper.AddConfigPath(home)
		viper.SetConfigName(".logics")
		cfgFile = path.Join(home, ".logics.yml")
	}

	viper.AutomaticEnv() // read in environment variables that match

	// If a config file is found, read it in.
	_ = viper.ReadInConfig()
}
// 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() {
	if cfgFile != "" {
		viper.SetConfigFile(cfgFile)
	} else {
		home, err := os.UserHomeDir()
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
		viper.AddConfigPath(home)
		viper.SetConfigName(".logics")
		cfgFile = path.Join(home, ".logics.yml")
	}
	viper.AutomaticEnv() 
	_ = viper.ReadInConfig()
}
func initConfig ( ) { if cfgFile != " " { viper . SetConfigFile ( cfgFile ) } else { home , err := os . UserHomeDir ( ) if err != nil { fmt . Println ( err ) os . Exit ( 1 ) } viper . AddConfigPath ( home ) viper . SetConfigName ( " " ) cfgFile = path . Join ( home , " " ) } viper . AutomaticEnv ( ) _ = viper . ReadInConfig ( ) }
initConfig reads in config file and ENV variables if set.
initConfig reads in config file and ENV variables if set .
// Use config file from the flag. // Find home directory. // Search config in home directory with name ".logics" (without extension). // read in environment variables that match // If a config file is found, read it in.