From e2db68d9666e509f77b0243bf31eae51f85eff9a Mon Sep 17 00:00:00 2001 From: porosnicuadrian Date: Fri, 11 Sep 2020 09:44:51 +0300 Subject: [PATCH] Applied changes from the last commit --- config/attributescfg.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/attributescfg.go b/config/attributescfg.go index a994e19ef..d580312c3 100644 --- a/config/attributescfg.go +++ b/config/attributescfg.go @@ -71,14 +71,14 @@ func (alS *AttributeSCfg) loadFromJsonCfg(jsnCfg *AttributeSJsonCfg) (err error) return } -func (alS *AttributeSCfg) AsMapInterface() map[string]interface{} { - initialMP := map[string]interface{}{ - utils.EnabledCfg: alS.Enabled, - utils.IndexedSelectsCfg: alS.IndexedSelects, - utils.ProcessRunsCfg: alS.ProcessRuns, - utils.NestedFieldsCfg: alS.NestedFields, +func (alS *AttributeSCfg) AsMapInterface() (initialMP map[string]interface{}) { + initialMP = map[string]interface{}{ + utils.EnabledCfg: alS.Enabled, + utils.IndexedSelectsCfg: alS.IndexedSelects, + utils.ProcessRunsCfg: alS.ProcessRuns, + utils.NestedFieldsCfg: alS.NestedFields, } - if alS.StringIndexedFields != nil { + if alS.StringIndexedFields != nil { stringIndexedFields := make([]string, len(*alS.StringIndexedFields)) for i, item := range *alS.StringIndexedFields { stringIndexedFields[i] = item @@ -99,5 +99,5 @@ func (alS *AttributeSCfg) AsMapInterface() map[string]interface{} { } initialMP[utils.SuffixIndexedFieldsCfg] = suffixIndexedFields } - return initialMP + return }