结构比对:
受影响因素:字段顺序,字段类型,字段值
package main import( "fmt" ) func main(){ sn1 := struct{ name string age int }{age: 11, name: "tom" } sn2 := struct{ name string age int }{age: 11, name: "tom" } fmt.Println(sn1 == sn2) }