mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
maps, slices: fix variable name and comment in example
Change-Id: I1c837820bdd64b61fca46d45677664b2bb2be606 Reviewed-on: https://go-review.googlesource.com/c/go/+/605356 Commit-Queue: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Run-TryBot: shuang cui <imcusg@gmail.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
65a6e05070
commit
0f1db95414
2 changed files with 3 additions and 3 deletions
|
|
@ -167,8 +167,8 @@ func ExampleValues() {
|
|||
10: "Ten",
|
||||
1000: "THOUSAND",
|
||||
}
|
||||
keys := slices.Sorted(maps.Values(m1))
|
||||
fmt.Println(keys)
|
||||
values := slices.Sorted(maps.Values(m1))
|
||||
fmt.Println(values)
|
||||
// Output:
|
||||
// [THOUSAND Ten one]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue