Skip to content

x/website: Effective go docs say there are 3 forms of for but with for .. range there are 4 #57545

@damonfeldman

Description

@damonfeldman

What is the URL of the page with the issue?

https://go.dev/doc/effective_go

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0

Screenshot

image

What did you expect to see?

I expected the
for key, value := range
form of a for loop to conform to one of the three for loop forms listed above, since the doc says there are only three forms.

What did you see instead?

Three forms listed, then immediate use of the fourth (for..range) form.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions