// SetupViper according to env var that selects related conf file
SetupViper according to env var that selects related conf file
// SetupViper according to env var that selects related conf file
func (a *API) SetupViper() error {
	filename := ".env"
	logrus.Infoln("Using env:" + os.Getenv("LUMEN_ENV"))
	switch os.Getenv("LUMEN_ENV") {
	case "testing":
		filename = "../.env.testing"
	case "prod":
		filename = ".env.prod"
	}
	err := godotenv.Overload(filename)
	utils.CheckErr(err)
	a.Config.SetEnvPrefix("lumen")
	a.Config.AutomaticEnv()
	return nil
}
func ( a * API ) SetupViper ( ) error { filename := " " logrus . Infoln ( " " + os . Getenv ( " " ) ) switch os . Getenv ( " " ) { case " " : filename = " " case " " : filename = " " } err := godotenv . Overload ( filename ) utils . CheckErr ( err ) a . Config . SetEnvPrefix ( " " ) a . Config . AutomaticEnv ( ) return nil }
SetupViper according to env var that selects related conf file
SetupViper according to env var that selects related conf file