fix: panic(nil) on loadConfig if config actually exists
This commit is contained in:
		@@ -56,7 +56,10 @@ func initConfig() {
 | 
			
		||||
	viper.AutomaticEnv()
 | 
			
		||||
 | 
			
		||||
	err := viper.ReadInConfig()
 | 
			
		||||
        if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
 | 
			
		||||
	if err == nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
 | 
			
		||||
		panic(err)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user