Closed kkchu791 closed 1 month ago
Would it be best to just remove the examples with range <int>
?
Would it be best to just remove the examples with
range <int>
?
This feature was released in Go 1.22, about 6 months ago. We expect gobyexample to be mostly used for folks who are learning the language, and these people don't have a reason to use old versions. Moreover, people turn to gobyexample specifically to find out how new features work in concrete small code examples. Therefore, we try to keep examples up to date with the newest language features.
In the For section, there's this code
It seems you can't iterate over an integer, you can only use range for
array, slice, string, map, or channel.