mirror of https://github.com/golang/go.git
maps: use strings.EqualFold in example
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
parent
6076edc55c
commit
15ef023853
|
|
@ -127,7 +127,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…
Reference in New Issue