Files
houston-be/config/config.go
Shubham Kirve b974cb6bf3 TP-0000 | Initialize houston repo (#1)
* TP-0000 | intialize houston repo

* TP-0000 | intialize houston repo
2023-03-29 00:01:17 +05:30

25 lines
500 B
Go

package config
import (
"os"
"strings"
"github.com/spf13/viper"
"go.uber.org/zap"
)
func LoadHoustonConfig(logger *zap.Logger) {
viper.AutomaticEnv()
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.SetConfigName("blazeless-config")
viper.SetConfigType("properties")
viper.SetConfigFile("./config/application-blazeless.properties")
err := viper.ReadInConfig()
if err != nil {
logger.Error("Error while loading blazeless configuration", zap.Error(err))
os.Exit(1)
}
}