Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/website/_content/doc/database: wrong variable name in example #66135

Closed
benhsainalaa opened this issue Mar 6, 2024 · 1 comment
Closed
Assignees
Labels
Documentation NeedsFix The path to resolution is known, but the work has not been done. website

Comments

@benhsainalaa
Copy link

What is the URL of the page with the issue?

https://go.dev/doc/database/querying

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Screenshot

Capture d’écran 2024-03-06 à 16 44 26

What did you do?

Open just the url https://go.dev/doc/database/querying

What did you see happen?

Actually in function albumsByArtist, the line albums = append(albums, album)

What did you expect to see?

The line albums = append(albums, album) should be albums = append(albums, alb) instead of album or change naming the variable by var album Album
if err := rows.Scan(&album.ID, &album.Title, &album.Artist,
&album.Price, &album.Quantity); err != nil {
return albums, err
}

@gopherbot gopherbot added this to the Unreleased milestone Mar 6, 2024
@seankhliao seankhliao changed the title x/pkgsite: Variable naming x/website/_content/doc/database: wrong variable name in example Mar 6, 2024
@seankhliao seankhliao added Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. website and removed pkgsite labels Mar 6, 2024
@gopherbot
Copy link

Change https://go.dev/cl/569915 mentions this issue: _content/doc/database: fix typo in db query example

@adonovan adonovan self-assigned this Mar 7, 2024
@findleyr findleyr modified the milestones: Unreleased, website/backlog Mar 20, 2024
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsFix The path to resolution is known, but the work has not been done. website
Projects
None yet
Development

No branches or pull requests

6 participants