You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the tutorial, the usage of the function is batchItems := items[start:end].
Golang slice is exclusive meaning the end is not included in the slice, therefore it should be batchItems := items[start:end+1].
The text was updated successfully, but these errors were encountered:
IsmailAfiff
changed the title
Indexing bug in slicing batchItems
Indexing bug in batchItems slicing
May 6, 2021
Any plans to either update the blog post or fix the issue here directly.
I of course understand that it's a breaking change and so probably not ideal, despite my shared thinking that [start:end] is the correct and assumed treatment regardless of what the blog post says, others may disagree. So, updating the post seems worthwhile to IMHO.
In the tutorial, the usage of the function is
batchItems := items[start:end]
.Golang slice is exclusive meaning the end is not included in the slice, therefore it should be
batchItems := items[start:end+1]
.The text was updated successfully, but these errors were encountered: