tpl/collections: Return en empty slice in after instead of error
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 1 Jul 2018 18:34:02 +0000 (20:34 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 1 Jul 2018 18:34:02 +0000 (20:34 +0200)
commitf8212d20009c4b5cc6e1ec733d09531eb6525d9f
treeb6176bb32da6002bbed2a0fee6c78bf8fd4f00ab
parent78e8a744b34e885e8169bf0a8bb64c73288e555a
tpl/collections: Return en empty slice in after instead of error

When the given index is out of bounds. So it can safely be used with `with` etc. without extra length checking.

Fixes #4894
tpl/collections/collections.go
tpl/collections/collections_test.go