Client-side pagination in Go (range-over function edition)
In light of Go 1.22’s experiment, that allows iterating over a function, I’m revisiting my note from 2022 on client-side pagination, using a generic iterator, to get an idea on how the range-over function might help with the task. I won’t delve into the details of the changes that Go brings. Refer to the “Rangefunc Experiment” Go wiki for the details. One only thing to mention, is that to enable the experiment, the executable must be built with the GOEXPERIMENT=rangefunc environment variable.
Vladimir Varankin