summaryrefslogtreecommitdiffstats
path: root/tpl/collections/collections.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-09-08 21:56:36 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-09-08 21:56:36 +0200
commit7a97d3e6bca1e30826e1662b5f299b66aa8ab385 (patch)
tree54e82d1d279aacddbc7db9387b36a9b24baa5f92 /tpl/collections/collections.go
parent6667c6d7430acc16b3683fbbacd263f1d00c8672 (diff)
tpl/collections: Allow pointer receiver in Group
See #4865
Diffstat (limited to 'tpl/collections/collections.go')
-rw-r--r--tpl/collections/collections.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tpl/collections/collections.go b/tpl/collections/collections.go
index 2ccee43d4..98d62a62c 100644
--- a/tpl/collections/collections.go
+++ b/tpl/collections/collections.go
@@ -326,7 +326,7 @@ func (ns *Namespace) Group(key interface{}, items interface{}) (interface{}, err
if tp.Kind() == reflect.Ptr {
tp = tp.Elem()
}
- in := reflect.Zero(tp).Interface()
+ in := reflect.New(tp).Interface()
switch vv := in.(type) {
case collections.Grouper:
return vv.Group(key, items)