diff --git a/config/config.go b/config/config.go index 4d2609d06..6ba2b595e 100644 --- a/config/config.go +++ b/config/config.go @@ -1282,7 +1282,7 @@ func (cfg *CGRConfig) loadCfgWithLocks(path, section string) (err error) { loadFuncs = append(loadFuncs, loadMap[sec]) } } else if fnct, has := loadMap[section]; !has { - return fmt.Errorf("Invalid section: <%s>", section) + return fmt.Errorf("Invalid section: <%s> ", section) } else { cfg.lks[section].Lock() defer cfg.lks[section].Unlock() @@ -1355,7 +1355,7 @@ func (cfg *CGRConfig) loadConfigFromFolder(cfgDir string, loadFuncs []func(jsnCf return } if !jsonFilesFound { - return fmt.Errorf("No config file found on path %s", cfgDir) + return fmt.Errorf("No config file found on path %s ", cfgDir) } return } diff --git a/config/config_test.go b/config/config_test.go index 5904ef03e..c78969b5c 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -5732,7 +5732,7 @@ func TestCallOnCGRConfig(t *testing.T) { } func TestLoadCfgFromJSONWithLocksInvalidSeciton(t *testing.T) { - expected := "Invalid section: " + expected := "Invalid section: " cfg := NewDefaultCGRConfig() if err = cfg.loadCfgWithLocks("/random/path", "invalidSection"); err == nil || err.Error() != expected { t.Errorf("Expected %+v, received %+v", expected, err)