Posted in

二分查找的Go语言特有风险:nil slice panic、unsafe.Pointer比较、interface{}类型擦除引发的隐式失败

第一章:二分查找的Go语言实现概 … 二分查找的Go语言特有风险:nil slice panic、unsafe.Pointer比较、interface{}类型擦除引发的隐式失败Read more

Posted in

Golang复杂模型JSON序列化丢失精度?不是float64问题,而是encoding/json中被忽略的1个interface{}类型擦除漏洞

第一章:Golang复杂模型JS … Golang复杂模型JSON序列化丢失精度?不是float64问题,而是encoding/json中被忽略的1个interface{}类型擦除漏洞Read more

Posted in

Go泛型容器与锁的兼容性危机:sync.Map无法泛型化?interface{}类型擦除后,这2类自定义结构体必须手动加锁

第一章:Go泛型容器与锁的兼容性 … Go泛型容器与锁的兼容性危机:sync.Map无法泛型化?interface{}类型擦除后,这2类自定义结构体必须手动加锁Read more

Posted in

Go后台结构体嵌套JSON序列化陷阱:omitempty导致空字符串丢失、time.Time时区错乱、interface{}类型擦除的解决方案库

第一章:Go后台结构体嵌套JSO … Go后台结构体嵌套JSON序列化陷阱:omitempty导致空字符串丢失、time.Time时区错乱、interface{}类型擦除的解决方案库Read more

Posted in

Go泛型+反射协同训练陷阱:type switch失效、reflect.Value.Kind()误判、interface{}类型擦除后的运行时panic防控训练

第一章:Go泛型与反射协同训练的 … Go泛型+反射协同训练陷阱:type switch失效、reflect.Value.Kind()误判、interface{}类型擦除后的运行时panic防控训练Read more