This commit is contained in:
ionutboangiu
2021-09-16 20:07:15 +03:00
committed by Dan Christian Bogos
parent e819f10c76
commit 564e2e1c0c
2 changed files with 2 additions and 3 deletions

View File

@@ -149,9 +149,7 @@ func (alS AttributeSCfg) Clone() (cln *AttributeSCfg) {
Enabled: alS.Enabled,
IndexedSelects: alS.IndexedSelects,
NestedFields: alS.NestedFields,
}
if alS.Opts != nil {
cln.Opts = alS.Opts.Clone()
Opts: alS.Opts.Clone(),
}
if alS.ResourceSConns != nil {
cln.ResourceSConns = utils.CloneStringSlice(alS.ResourceSConns)

View File

@@ -167,6 +167,7 @@ func TestAttributeSCfgClone(t *testing.T) {
PrefixIndexedFields: &[]string{"*req.index1", "*req.index2"},
SuffixIndexedFields: &[]string{"*req.index1"},
NestedFields: true,
Opts: &AttributesOpts{},
}
rcv := ban.Clone()
if !reflect.DeepEqual(ban, rcv) {