github.com/segmentio/kafka-go@v0.4.48-0.20240318174348-3f6244eb34fd/protocol/prototest/bytes.go (about) 1 package prototest 2 3 import ( 4 "github.com/segmentio/kafka-go/protocol" 5 ) 6 7 // Bytes constructs a Bytes which exposes the content of b. 8 func Bytes(b []byte) protocol.Bytes { 9 return protocol.NewBytes(b) 10 } 11 12 // String constructs a Bytes which exposes the content of s. 13 func String(s string) protocol.Bytes { 14 return protocol.NewBytes([]byte(s)) 15 }