From c6a965e140b6597c5838178e23d6fc9c4530f855 Mon Sep 17 00:00:00 2001 From: Hunter Long Date: Sat, 29 Feb 2020 21:04:27 -0800 Subject: [PATCH] postgres fix --- core/configs.go | 2 +- utils/utils.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/configs.go b/core/configs.go index cba66676..0ae0458d 100644 --- a/core/configs.go +++ b/core/configs.go @@ -33,7 +33,7 @@ type ErrorResponse struct { func LoadConfigFile(directory string) (*DbConfig, error) { var configs *DbConfig - dbConn := utils.Getenv("DB_CONN", "") + dbConn := utils.Getenv("DB_CONN", "").(string) if dbConn != "" { log.Infof("DB_CONN=%s environment variable was found, waiting for database...", dbConn) diff --git a/utils/utils.go b/utils/utils.go index ab3076a9..7a8609af 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -90,7 +90,7 @@ func Getenv(key string, defaultValue interface{}) interface{} { var services []*types.Service if err := json.Unmarshal([]byte(val), services); err != nil { Log.Error("Incorrect formatting with SERVICE environment variable") - return nil + return []*types.Service{} } return services default: