mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
maps: use strings.EqualFold in example
Change-Id: I40a9684a9465e844ff1de46601edf23de7b637e3
GitHub-Last-Rev: 15ef023853
GitHub-Pull-Request: golang/go#65541
Reviewed-on: https://go-review.googlesource.com/c/go/+/561855
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
113eb42efc
commit
eec40aae45
1 changed files with 1 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ func ExampleEqualFunc() {
|
|||
1000: []byte("Thousand"),
|
||||
}
|
||||
eq := maps.EqualFunc(m1, m2, func(v1 string, v2 []byte) bool {
|
||||
return strings.ToLower(v1) == strings.ToLower(string(v2))
|
||||
return strings.EqualFold(v1, string(v2))
|
||||
})
|
||||
fmt.Println(eq)
|
||||
// Output:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue