1 2 3 4 5 6 7 8 9
package buffer type Option func(*Buffer) func WithData(data []byte) Option { return func(b *Buffer) { b.buf = data } }