maps: use strings.EqualFold in example

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
guoguangwu 2024-02-06 14:50:42 +08:00
parent 6076edc55c
commit 15ef023853
1 changed files with 1 additions and 1 deletions

View File

@ -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: