// LoadConfig - Load the config parameters
Load the config parameters
// LoadConfig - Load the config parameters
func LoadConfig() {
	configFilePath = flag.String("config-file-path", "config/", "config/")
	flag.Parse()
	viper.SetConfigName("app")
	viper.SetConfigType("yaml")
	viper.AddConfigPath(*configFilePath)
	if err := viper.ReadInConfig(); err != nil {
		if readErr, ok := err.(viper.ConfigFileNotFoundError); ok {
			log.Panic().Msgf("No config file found at %s\n", *configFilePath)
		} else {
			log.Panic().Msgf("Error reading config file: %s\n", readErr)
		}
	}
}
func LoadConfig ( ) { configFilePath = flag . String ( " " , " " , " " ) flag . Parse ( ) viper . SetConfigName ( " " ) viper . SetConfigType ( " " ) viper . AddConfigPath ( * configFilePath ) if err := viper . ReadInConfig ( ) ; err != nil { if readErr , ok := err . ( viper . ConfigFileNotFoundError ) ; ok { log . Panic ( ) . Msgf ( " \n " , * configFilePath ) } else { log . Panic ( ) . Msgf ( " \n " , readErr ) } } }
Load the config parameters
Load the config parameters
// file path is loaded // file name is loaded // file path is loaded // file is read