diff options
Diffstat (limited to 'tpl/collections/collections.go')
-rw-r--r-- | tpl/collections/collections.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tpl/collections/collections.go b/tpl/collections/collections.go index 8f09097a7..34b8e7f77 100644 --- a/tpl/collections/collections.go +++ b/tpl/collections/collections.go @@ -503,25 +503,25 @@ func (i *intersector) appendIfNotSeen(v reflect.Value) { } } -func (ins *intersector) handleValuePair(l1vv, l2vv reflect.Value) { +func (i *intersector) handleValuePair(l1vv, l2vv reflect.Value) { switch kind := l1vv.Kind(); { case kind == reflect.String: l2t, err := toString(l2vv) if err == nil && l1vv.String() == l2t { - ins.appendIfNotSeen(l1vv) + i.appendIfNotSeen(l1vv) } case isNumber(kind): f1, err1 := numberToFloat(l1vv) f2, err2 := numberToFloat(l2vv) if err1 == nil && err2 == nil && f1 == f2 { - ins.appendIfNotSeen(l1vv) + i.appendIfNotSeen(l1vv) } case kind == reflect.Ptr, kind == reflect.Struct: if l1vv.Interface() == l2vv.Interface() { - ins.appendIfNotSeen(l1vv) + i.appendIfNotSeen(l1vv) } case kind == reflect.Interface: - ins.handleValuePair(reflect.ValueOf(l1vv.Interface()), l2vv) + i.handleValuePair(reflect.ValueOf(l1vv.Interface()), l2vv) } } |