diff options
author | Ricardo N Feliciano <FelicianoTech@gmail.com> | 2018-09-22 14:58:46 -0400 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-09-22 20:58:46 +0200 |
commit | cae07ce84b3bd4a33fd18b5109a1a3c3dce2191c (patch) | |
tree | a3f0ba8983d882fbcad9aee8b19f37ee9e78d3a6 /tpl/collections/collections_test.go | |
parent | 4f9c109dc5431553e5dbf98e0ed37487c12e8d16 (diff) |
tpl/collections: Allow first function to return an empty slice
Fixes #5235
Diffstat (limited to 'tpl/collections/collections_test.go')
-rw-r--r-- | tpl/collections/collections_test.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tpl/collections/collections_test.go b/tpl/collections/collections_test.go index c2d4cacbf..7b15151d2 100644 --- a/tpl/collections/collections_test.go +++ b/tpl/collections/collections_test.go @@ -256,6 +256,7 @@ func TestFirst(t *testing.T) { {int64(2), []int{100, 200, 300}, []int{100, 200}}, {100, []int{100, 200}, []int{100, 200}}, {"1", []int{100, 200, 300}, []int{100}}, + {0, []string{"h", "u", "g", "o"}, []string{}}, {int64(-1), []int{100, 200, 300}, false}, {"noint", []int{100, 200, 300}, false}, {1, nil, false}, |