go 结构体列表比较是否相等
摘要:
使用reflect的DeepEqual方法 场景1:结构体列表按顺序匹配(直接比较) package main import ( "fmt" "reflect" ) type Student struct { Age int Score int } func main() { s1 := []Stu 阅读全文
posted @ 2024-08-28 21:15 王景迁 阅读(8) 评论(0) 推荐(0) 编辑
posted @ 2024-08-28 21:15 王景迁 阅读(8) 评论(0) 推荐(0) 编辑
posted @ 2024-08-28 20:58 王景迁 阅读(36) 评论(0) 推荐(0) 编辑