I defined a struct as below, but always get the build error: “undefined: bytes in bytes.Buffer”
type test struct {
id int64
Content []byte
Buffer *bytes.Buffer
}
You forgot about import statement.
import "bytes"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With