Golang之Buffer缓冲器

// 创建 Buffer
import ""
var DataBuffer bytes.Buffer
var DataBuffer1 =  bytes.NewBuffer([]byte{})
var DataBuffer2 =  bytes.NewBufferString("abc")

// 写入数据
DataBuffer.Write([]byte("Hello"))
DataBuffer1.WriteString("Hello")
DataBuffer2.WriteByte([]byte("Hello"))

// 读取数据
DataBuffer.String()