Skip to content

How to compare struct, slice, map are equal?

pikachule edited this page Jul 9, 2018 · 1 revision
m1 := map[string]int{   
    "a":1,
    "b":2,
}
m2 := map[string]int{   
    "a":1,
    "b":2,
}
fmt.Println(reflect.DeepEqual(m1, m2))

Clone this wiki locally