mmcgrana / gobyexample

Go by Example
https://gobyexample.com
7.16k stars 1.26k forks source link

Fix InvalidRangeExpr error #528

Closed CodeAnk2829 closed 3 months ago

CodeAnk2829 commented 3 months ago

Issue

Range based for loop is giving InvalidRangeExpr error.

Expected Behaviour

It should not give InvalidRangeExpr error. Either range based for loop should be replaced by initial/condition/after for loop or constant integer type value should be replace by an array, slice or map.

Reference: (https://gobyexample.com/for)