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: Map literals less changes and text details #195

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

Conversation

crisman
Copy link
Contributor

@crisman crisman commented Feb 23, 2023

Between 'map-literals.go' and 'map-literals-continued.go' there are four changes (omit element type, single line the block, add space to align the "Google" element, and remove the terminal comma in the block) which makes it hard for a reader to understand what it is "you can omit" in the 'Map literals continued' section of 'moretypes.article'.

To avoid the three text changes that the article does not talk about, update the before code in 'map-literals.go' to already be formatted on a single line per map entry.

Add code examples in the article explaining the two versions and why the literal element type may be elided.

Fixes golang/tour#1449

Between 'map-literals.go' and 'map-literals-continued.go' there are four
changes (omit element type, single line the block, add space to align
the "Google" element, and remove the terminal comma in the block) which
makes it hard for a reader to understand what it is "you can omit" in
the 'Map literals continued' section of 'moretypes.article'.

To avoid the three text changes that the article does not talk about,
update the before code in 'map-literals.go' to already be formatted on a
single line per map entry.

Add code examples in the article explaining the two versions and why the
literal element type may be elided.

Fixes golang/tour#1449
@gopherbot
Copy link
Contributor

This PR (HEAD: 2f50f85) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/website/+/470855 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

@crisman
Copy link
Contributor Author

crisman commented Feb 24, 2023

With the extra detail in the article I think this also
Fixes golang/tour#174

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.

Map literals code change unclear
2 participants