github.com/deanMdreon/kafka-go@v0.4.32/protocol/prototest/bytes.go (about)

     1  package prototest
     2  
     3  import (
     4  	"github.com/deanMdreon/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  }