bytes.Buffer.Bytes (method)
74 uses
bytes (current package)
buffer.go#L60: func (b *Buffer) Bytes() []byte { return b.buf[b.off:] }
crypto/tls
auth.go#L130: return b.Bytes()
conn.go#L583: copy(err.RecordHeader[:], c.rawInput.Bytes())
conn.go#L638: hdr := c.rawInput.Bytes()[:recordHeaderLen]
conn.go#L1097: data := c.hand.Bytes()
conn.go#L1412: recordType(c.rawInput.Bytes()[0]) == recordTypeAlert {
quic.go#L294: b := q.conn.hand.Bytes()
encoding/json
v2_stream.go#L152: b = enc.indentBuf.Bytes()
encoding/pem
pem.go#L334: return buf.Bytes()
encoding/xml
marshal.go#L91: return b.Bytes(), nil
marshal.go#L142: return b.Bytes(), nil
read.go#L573: saveXMLData = d.saved.Bytes()[saveXMLIndex:savedOffset]
xml.go#L633: data := d.buf.Bytes()
xml.go#L695: data := d.buf.Bytes()
xml.go#L785: return Directive(d.buf.Bytes()), nil
xml.go#L891: return d.buf.Bytes()
xml.go#L1076: s := string(d.buf.Bytes()[start:])
xml.go#L1097: name := d.buf.Bytes()[before+1:]
xml.go#L1121: ent := string(d.buf.Bytes()[before:])
xml.go#L1140: data := d.buf.Bytes()
xml.go#L1201: b := d.buf.Bytes()
github.com/jackc/pgx/v5/pgtype
numeric.go#L305: return buf.Bytes()
point.go#L110: return buff.Bytes(), nil
uuid.go#L118: return buff.Bytes(), nil
go.pact.im/x/goupdate
modules.go#L35: if err := json.Unmarshal(buf.Bytes(), &m); err != nil {
report.go#L36: out := bytes.TrimSpace(buf.Bytes())
tests.go#L69: r.Stderr = stderr.Bytes()
workspaces.go#L62: if err := json.Unmarshal(buf.Bytes(), &work); err != nil {
workspaces.go#L105: if err := json.Unmarshal(buf.Bytes(), &out); err != nil {
go.pact.im/x/zapjournal
encoder.go#L214: e.buf = buf.Bytes()
json.go#L83: e.setBuf(buf.Bytes())
go/ast
commentmap.go#L287: bytes := buf.Bytes()
go/doc/comment
html.go#L27: return out.Bytes()
markdown.go#L35: return out.Bytes()
markdown.go#L99: line := bytes.TrimSpace(p.raw.Bytes())
print.go#L188: return out.Bytes()
text.go#L63: return out.Bytes()
text.go#L70: data := out.Bytes()
go/format
format.go#L76: file, err = parser.ParseFile(fset, "", buf.Bytes(), parserMode)
internal.go#L109: return buf.Bytes(), nil
internal.go#L152: out := sourceAdj(buf.Bytes(), cfg.Indent)
go/parser
interface.go#L34: return s.Bytes(), nil
golang.org/x/net/http2
write.go#L240: headerBlock := buf.Bytes()
write.go#L289: headerBlock := buf.Bytes()
write.go#L320: BlockFragment: buf.Bytes(),
golang.org/x/net/http2/hpack
hpack.go#L256: d.buf = d.saveBuf.Bytes()
huffman.go#L28: return w.Write(buf.Bytes())
golang.org/x/tools/go/packages
external.go#L143: if len(stderr.Bytes()) != 0 && os.Getenv("GOPACKAGESPRINTDRIVERERRORS") != "" {
external.go#L148: if err := json.Unmarshal(buf.Bytes(), &response); err != nil {
golang.org/x/tools/internal/gcimporter
iexport.go#L288: return out.Bytes(), err
golang.org/x/tools/internal/gocommand
vendor.go#L54: goflags := string(bytes.TrimSpace(stdout.Bytes()))
vendor.go#L122: goWork := string(bytes.TrimSpace(stdout.Bytes()))
html/template
escape.go#L829: e.editTextNode(n, b.Bytes())
log/slog
json_handler.go#L175: bs := j.buf.Bytes()
mime/multipart
formdata.go#L182: if _, err := file.Write(b.Bytes()); err != nil {
formdata.go#L205: fh.content = b.Bytes()
net/http
request.go#L937: buf := v.Bytes()
server.go#L4094: w.Write(tw.wbuf.Bytes())
net/http/httputil
dump.go#L37: return io.NopCloser(&buf), io.NopCloser(bytes.NewReader(buf.Bytes())), nil
dump.go#L154: dump := buf.Bytes()
dump.go#L284: return b.Bytes(), nil
dump.go#L335: return b.Bytes(), nil
net/http/internal/http2
transport.go#L1428: hdrs := cc.hbuf.Bytes()
transport.go#L1876: return cc.hbuf.Bytes(), nil
write.go#L239: headerBlock := buf.Bytes()
write.go#L288: headerBlock := buf.Bytes()
write.go#L319: BlockFragment: buf.Bytes(),
net/http/pprof
pprof.go#L239: w.Write(buf.Bytes())
pprof.go#L469: _, err := w.Write(b.Bytes())
os/exec
exec.go#L1046: return stdout.Bytes(), err
exec.go#L1062: return b.Bytes(), err
exec.go#L1205: return buf.Bytes()
vendor/golang.org/x/net/http2/hpack
hpack.go#L257: d.buf = d.saveBuf.Bytes()
huffman.go#L28: return w.Write(buf.Bytes())