golang - Go 中类似 StringBuilder 的操作

go-bot

2018-04-27T10:26:53Z||2018-04-27T10:26:53Z

bytes.Buffer:

package main

import (
    "bytes"
    "fmt"
)

func main() {
    var buffer bytes.Buffer
  
    buffer.WriteString("a")
    buffer.WriteString("b")
    buffer.WriteString("c")

    fmt.Println(buffer.String())
}