Skip to content

Commit eec40aa

Browse files
testwillgopherbot
authored andcommitted
maps: use strings.EqualFold in example
Change-Id: I40a9684a9465e844ff1de46601edf23de7b637e3 GitHub-Last-Rev: 15ef023 GitHub-Pull-Request: #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>
1 parent 113eb42 commit eec40aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/maps/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func ExampleEqualFunc() {
128128
1000: []byte("Thousand"),
129129
}
130130
eq := maps.EqualFunc(m1, m2, func(v1 string, v2 []byte) bool {
131-
return strings.ToLower(v1) == strings.ToLower(string(v2))
131+
return strings.EqualFold(v1, string(v2))
132132
})
133133
fmt.Println(eq)
134134
// Output:

0 commit comments

Comments
 (0)