highlight all changed parts of the tutorial code
This change is a fix for what appears to be a typo. In the modules tutorial, in [section "Return greetings for multiple people"](https://golang.org/doc/tutorial/greetings-multiple-people), the step 2 code block does not indicate all the changed sections.
Everything I highlighted needs to changed in order for the code to work as intended. I found the highlights to be very helpful in following and transcribing the tutorial, so I noticed when they were incorrect.
Change-Id: I0e5ccdef4053b2f6a7a5688e5be9c3f6307c5486
GitHub-Last-Rev: 84a5c6e3ba
GitHub-Pull-Request: golang/website#49
Reviewed-on: https://go-review.googlesource.com/c/website/+/311329
Reviewed-by: Steve Traut <straut@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
Родитель
a752210e8d
Коммит
08809b7f2b
|
@ -156,16 +156,16 @@ func main() {
|
|||
log.SetFlags(0)
|
||||
|
||||
<ins>// A slice of names.
|
||||
names := []string{"Gladys", "Samantha", "Darrin"}</ins>
|
||||
names := []string{"Gladys", "Samantha", "Darrin"}
|
||||
|
||||
// Request greeting messages for the names.
|
||||
messages, err := greetings.Hellos(names)
|
||||
messages, err := greetings.Hellos(names)</ins>
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
// If no error was returned, print the returned map of
|
||||
<ins>// If no error was returned, print the returned map of
|
||||
// messages to the console.
|
||||
fmt.Println(messages)
|
||||
fmt.Println(messages)</ins>
|
||||
}
|
||||
</pre>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче