字符串拼接性能

golang中字符串拼接方法
+=
fmt.sprintf
append
buffer.WriteString
copy

效率:copy > append > buf.WriteString > += > fmt.Sprintf
所以请慎用fmt.Sprinf 和 +=



https://studygolang.com/articles/18764?fr=sidebar


Category golang