website
website copied to clipboard
tour: Map literals less changes and text details
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
This PR (HEAD: 2f50f85e885aa3c15d7809be51b53c36bdca8ab0) 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
With the extra detail in the article I think this also Fixes golang/tour#174