1. 不同类型的结构体,是不能进行比较!(mismatch type)
2. 相同类型的结构体可以比较,但必须保证结构体的属性值必须是可比较的!(在golang中指针,切片,函数都是不可比较)
Struct values are comparable if all their fields are comparable. Two struct values are equal if their corresponding non-blank fields are equal.
通过demo来实际操作,加深理解. Let's go!