Skip to content

Commit e54deb6

Browse files
committed
Fix go/slice for two indexes
Signed-off-by: James Hamlin <[email protected]>
1 parent 38d1bdd commit e54deb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/lang/builtins.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func GoSlice(slc interface{}, indices ...interface{}) interface{} {
211211
if len(indices) == 0 {
212212
panic(fmt.Errorf("slice: no indices"))
213213
}
214-
if len(indices) == 1 {
214+
if len(indices) >= 1 {
215215
if !IsNil(indices[0]) {
216216
i = MustAsInt(indices[0])
217217
}

0 commit comments

Comments
 (0)