Closed crazicrow closed 1 month ago
Hi - The for range loop annotation on: https://gobyexample.com/for
Has the text "Another way of accomplishing the basic 'do this N times' iteration is range over an integer."
However I believe range actually doesn't work on an integer, and is only for an array, slice, string, map, or channel.
Trying to use range on a int gave me errors, and this also seems to be backed up on go documentation page: https://go.dev/wiki/Range
If I am wrong though I accept that and apologise for wasting time.
https://github.com/mmcgrana/gobyexample?tab=readme-ov-file#what-version-of-go-is-required-to-run-these-examples
Hi - The for range loop annotation on: https://gobyexample.com/for
Has the text "Another way of accomplishing the basic 'do this N times' iteration is range over an integer."
However I believe range actually doesn't work on an integer, and is only for an array, slice, string, map, or channel.
Trying to use range on a int gave me errors, and this also seems to be backed up on go documentation page: https://go.dev/wiki/Range
If I am wrong though I accept that and apologise for wasting time.