gitalk icon indicating copy to clipboard operation
gitalk copied to clipboard

与日俱进,在 Go 1.20 中这种高效转换的方式又变了

Open utterances-bot opened this issue 3 years ago • 1 comments

与日俱进,在 Go 1.20 中这种高效转换的方式又变了

在 Go 1.19 的开发中, string.SliceHeader和string.StringHeader经历了一个生死存亡的争斗,这两个类型一度被标记为弃用(deprecated),但是这两个类型经常用在 slice of byte 和 string 高效互转的场景中,如果被标记为弃用,但是目前还没有可替代的方法,所以这两个类型又把弃用标记去掉了,如无意外,它们

https://colobu.com/2022/09/06/string-byte-convertion/

utterances-bot avatar Sep 15 '22 13:09 utterances-bot

”这不,在 Go 1.12 中“,指的是 Go 1.20 吗

wathenjiang avatar Sep 15 '22 13:09 wathenjiang