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

tour: struct literals in same def/print order #205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crisman
Copy link
Contributor

@crisman crisman commented Mar 4, 2023

The current code on "tour/moretypes/5" ("Struct Literals") seems to be designed to confuse a reader into thinking that contents of 'v1' and 'p' are importantly the same. The contents of both variable's structs have the same int values and then when printed they are (what seems like purposefully, but with no explanation) printed next to each other.

Set the values in 'p' to be different and print the values in the same order they are defined in.

The current code on "tour/moretypes/5" ("Struct Literals") seems to be
designed to confuse a reader into thinking that contents of 'v1' and 'p'
are importantly the same.  The contents of both variable's structs have
the same int values and then when printed they are (what seems like
purposefully, but with no explanation) printed next to each other.

Set the values in 'p' to be different and print the values in the same
order they are defined in.
@gopherbot
Copy link
Contributor

This PR (HEAD: 836bd29) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/website/+/473475 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants