Posted in

Go中字符串参数的“双面性”:为什么len(s)为0时仍可能触发底层数组拷贝?runtime/string.go第89行注释揭示答案

第一章:Go语言如何看传递的参数 … Go中字符串参数的“双面性”:为什么len(s)为0时仍可能触发底层数组拷贝?runtime/string.go第89行注释揭示答案Read more

Posted in

Go字符串高频陷阱TOP 7:panic(“string index out of range”)、byte vs rune误用、unsafe.String滥用…你中了几个?

第一章:Go字符串高频陷阱的底层 … Go字符串高频陷阱TOP 7:panic(“string index out of range”)、byte vs rune误用、unsafe.String滥用…你中了几个?Read more