我定义了一个结构如下,但总是得到构建错误:“undefined: bytes in bytes.Buffer”
type test struct {
id int64
Content []byte
Buffer *bytes.Buffer
}
最佳答案
你忘记了 import 语句。
import "bytes"
关于golang 编译错误 : undefined: bytes in bytes. 缓冲区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42391898/