MCPcopy
hub / github.com/duke-git/lancet / ExampleEqual

Function ExampleEqual

compare/compare_example_test.go:8–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6)
7
8func ExampleEqual() {
9 result1 := Equal(1, 1)
10 result2 := Equal("1", "1")
11 result3 := Equal([]int{1, 2, 3}, []int{1, 2, 3})
12 result4 := Equal(map[int]string{1: "a", 2: "b"}, map[int]string{1: "a", 2: "b"})
13
14 result5 := Equal(1, "1")
15 result6 := Equal(1, int64(1))
16 result7 := Equal([]int{1, 2}, []int{1, 2, 3})
17
18 fmt.Println(result1)
19 fmt.Println(result2)
20 fmt.Println(result3)
21 fmt.Println(result4)
22 fmt.Println(result5)
23 fmt.Println(result6)
24 fmt.Println(result7)
25
26 // Output:
27 // true
28 // true
29 // true
30 // true
31 // false
32 // false
33 // false
34}
35
36func ExampleEqualValue() {
37 result1 := EqualValue(1, 1)

Callers

nothing calls this directly

Calls 1

EqualFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…