From a7487cd371f9f823bce16ea41d68ccdb4723ca44 Mon Sep 17 00:00:00 2001 From: Alexander Zavorotynskiy Date: Wed, 28 Sep 2022 15:47:30 +0200 Subject: [PATCH] feat(backend): removed debug log from configurator module --- backend/internal/config/configurator/configurator.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/internal/config/configurator/configurator.go b/backend/internal/config/configurator/configurator.go index 3ffa8f7d7..5335d4a91 100644 --- a/backend/internal/config/configurator/configurator.go +++ b/backend/internal/config/configurator/configurator.go @@ -17,9 +17,6 @@ import ( ) func readFile(path string) (map[string]string, error) { - if path == "" { - return nil, fmt.Errorf("file path is empty") - } file, err := os.Open(path) if err != nil { return nil, fmt.Errorf("can't open file: %s", err) @@ -40,6 +37,10 @@ func readFile(path string) (map[string]string, error) { } func parseFile(a interface{}, path string) { + // Skip parsing process without logs if we don't have path to config file + if path == "" { + return + } envs, err := readFile(path) if err != nil { log.Printf("can't parse config file: %s", err)