不输出111
2020-03-20 本文已影响0人
anthonydan
结构体还与结构体顺序有关
m1 := struct {
name string
age int
}{"dan", 11}
m2 := struct {
age int
name string
}{11, "dan"}
if reflect.DeepEqual(m1, m2) {
fmt.Println(111)
}
结构体还与结构体顺序有关
m1 := struct {
name string
age int
}{"dan", 11}
m2 := struct {
age int
name string
}{11, "dan"}
if reflect.DeepEqual(m1, m2) {
fmt.Println(111)
}