- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ExampleEqualFunc (0.79 sec)
-
src/maps/example_test.go
1: "one", 10: "ten", 1000: "thousand", } fmt.Println(maps.Equal(m1, m2)) fmt.Println(maps.Equal(m1, m3)) // Output: // true // false } func ExampleEqualFunc() { m1 := map[int]string{ 1: "one", 10: "Ten", 1000: "THOUSAND", } m2 := map[int][]byte{ 1: []byte("One"), 10: []byte("Ten"), 1000: []byte("Thousand"), }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 11 20:21:56 UTC 2023 - 2.2K bytes - Viewed (0) -
src/slices/example_test.go
func ExampleEqual() { numbers := []int{0, 42, 8} fmt.Println(slices.Equal(numbers, []int{0, 42, 8})) fmt.Println(slices.Equal(numbers, []int{10})) // Output: // true // false } func ExampleEqualFunc() { numbers := []int{0, 42, 8} strings := []string{"000", "42", "0o10"} equal := slices.EqualFunc(numbers, strings, func(n int, s string) bool { sn, err := strconv.ParseInt(s, 0, 64) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:28:50 UTC 2024 - 8.1K bytes - Viewed (0)