File: bytes.go

package info (click to toggle)
golang-github-segmentio-kafka-go 0.4.49%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,292 kB
  • sloc: sh: 17; makefile: 10
file content (15 lines) | stat: -rw-r--r-- 342 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package prototest

import (
	"github.com/segmentio/kafka-go/protocol"
)

// Bytes constructs a Bytes which exposes the content of b.
func Bytes(b []byte) protocol.Bytes {
	return protocol.NewBytes(b)
}

// String constructs a Bytes which exposes the content of s.
func String(s string) protocol.Bytes {
	return protocol.NewBytes([]byte(s))
}