Description:
I found an issue with the code example provided in the official Go documentation while practicing. The code example is located https://gobyexample.com/for.
Issue Details:
Location: The incorrect code example is located in the section for loop page of go by example website.
Problem: Here, you're attempting to range over the integer 3, which is not valid syntax. The range keyword in Go is used to iterate over elements of a collection like arrays, slices, maps, or channels, but not a single integer
Impact: This can confuse beginners who are learning from the official documentation.
Proposed Solution: Provide a corrected version of the code example or remove it until it's fixed.
Steps to Reproduce:
Navigate to the for loop page of go by example.
Observe the code example provided.
Notice the syntax errors and logic issues.
Expected Behavior:
The code example should be correct and demonstrate the intended functionality.
Additional Information:
I'm using go by example to practice Go.
Any additional context or information you think is relevant.
Thank you for your attention to this matter. Let me know if you need any further assistance.
Description: I found an issue with the code example provided in the official Go documentation while practicing. The code example is located https://gobyexample.com/for.
Issue Details: Location: The incorrect code example is located in the section for loop page of go by example website. Problem: Here, you're attempting to range over the integer 3, which is not valid syntax. The range keyword in Go is used to iterate over elements of a collection like arrays, slices, maps, or channels, but not a single integer Impact: This can confuse beginners who are learning from the official documentation. Proposed Solution: Provide a corrected version of the code example or remove it until it's fixed. Steps to Reproduce:
Navigate to the for loop page of go by example. Observe the code example provided. Notice the syntax errors and logic issues.
Expected Behavior: The code example should be correct and demonstrate the intended functionality.
Additional Information:
I'm using go by example to practice Go. Any additional context or information you think is relevant.
Thank you for your attention to this matter. Let me know if you need any further assistance.