我定义了以下结构体,但总是会遇到构建错误:“bytes.Buffer 中的 bytes 未定义”。
type test struct {
id int64
Content []byte
Buffer *bytes.Buffer
}
type test struct {
id int64
Content []byte
Buffer *bytes.Buffer
}
bytes.Buffer
的指针。该结构体内部有一些“临时空间”,用于避免为小缓冲区进行不必要的分配。 - user142162bytes
! - Mohsen Kamrani