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"