return nil, err
}
- if limitv < 1 {
- return nil, errors.New("can't return negative/empty count of items from sequence")
+ if limitv < 0 {
+ return nil, errors.New("can't return negative count of items from sequence")
}
seqv := reflect.ValueOf(seq)
{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},