diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/collections/collections.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/collections/collections.go b/common/collections/collections.go index bb47c8acc..854f705b3 100644 --- a/common/collections/collections.go +++ b/common/collections/collections.go @@ -19,3 +19,10 @@ package collections type Grouper interface { Group(key interface{}, items interface{}) (interface{}, error) } + +// Slicer definse a very generic way to create a typed slice. This is used +// in collections.Slice template func to get types such as Pages, PageGroups etc. +// instead of the less useful []interface{}. +type Slicer interface { + Slice(items []interface{}) (interface{}, error) +} |