bytes.Buffer.Bytes (method)

150 uses

	bytes (current package)
		buffer.go#L54: func (b *Buffer) Bytes() []byte { return b.buf[b.off:] }

	cloud.google.com/go/profiler
		profiler.go#L417: 	p.ProfileBytes = prof.Bytes()

	cloud.google.com/go/storage
		storage.go#L631: 	sum := sha256.Sum256(buf.Bytes())
		storage.go#L655: 	b, err := signBytes(signBuf.Bytes())
		storage.go#L718: 	b, err := signBytes(buf.Bytes())

	crypto/tls
		auth.go#L87: 		return b.Bytes()
		conn.go#L568: 	copy(err.RecordHeader[:], c.rawInput.Bytes())
		conn.go#L617: 	hdr := c.rawInput.Bytes()[:recordHeaderLen]
		conn.go#L1013: 	data := c.hand.Bytes()
		conn.go#L1296: 		recordType(c.rawInput.Bytes()[0]) == recordTypeAlert {

	encoding/json
		encode.go#L165: 	buf := append([]byte(nil), e.Bytes()...)
		encode.go#L185: 	return buf.Bytes(), nil
		encode.go#L644: 		e.stringBytes(e2.Bytes(), false)
		stream.go#L219: 	b := e.Bytes()
		stream.go#L229: 		b = enc.indentBuf.Bytes()

	encoding/pem
		pem.go#L339: 	return buf.Bytes()

	encoding/xml
		marshal.go#L84: 	return b.Bytes(), nil
		marshal.go#L132: 	return b.Bytes(), nil
		read.go#L543: 				saveXMLData = d.saved.Bytes()[saveXMLIndex:savedOffset]
		xml.go#L627: 		data := d.buf.Bytes()
		xml.go#L689: 			data := d.buf.Bytes()
		xml.go#L773: 		return Directive(d.buf.Bytes()), nil
		xml.go#L879: 	return d.buf.Bytes()
		xml.go#L1055: 					s := string(d.buf.Bytes()[start:])
		xml.go#L1076: 					name := d.buf.Bytes()[before+1:]
		xml.go#L1100: 			ent := string(d.buf.Bytes()[before:])
		xml.go#L1119: 	data := d.buf.Bytes()
		xml.go#L1179: 	b := d.buf.Bytes()

	github.com/aws/aws-sdk-go/aws/credentials/processcreds
		provider.go#L374: 				return output.Bytes(), awserr.NewBatchError(
		provider.go#L381: 			return output.Bytes(), awserr.NewBatchError(
		provider.go#L388: 	out := output.Bytes()

	github.com/aws/aws-sdk-go/private/protocol/json/jsonutil
		build.go#L27: 	return buf.Bytes(), err
		unmarshal.go#L35: 		return awserr.NewUnmarshalError(err, msg, errBuf.Bytes())

	github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil
		unmarshal.go#L29: 			"failed to unmarshal error message", errBuf.Bytes())

	github.com/go-git/gcfg
		set.go#L208: 		gd := gob.NewDecoder(bytes.NewReader(b.Bytes()))

	github.com/go-git/go-git/v5/config
		config.go#L361: 	return buf.Bytes(), nil
		modules.go#L74: 	return buf.Bytes(), nil

	github.com/go-git/go-git/v5/plumbing/format/idxfile
		writer.go#L147: 		idx.Offset32[bucket] = append(idx.Offset32[bucket], buf.Bytes()...)
		writer.go#L151: 		idx.CRC32[bucket] = append(idx.CRC32[bucket], buf.Bytes()...)
		writer.go#L167: 	w.index.Offset64 = append(w.index.Offset64, buf.Bytes()...)

	github.com/go-git/go-git/v5/plumbing/format/packfile
		diff_delta.go#L64: 	db := diffDelta(index, bb.Bytes(), tb.Bytes())
		diff_delta.go#L138: 	return append([]byte{}, buf.Bytes()...)
		diff_delta.go#L146: 	b := ibuf.Bytes()
		packfile.go#L125: 	delta := buf.Bytes()
		packfile.go#L349: 	err = ApplyDelta(obj, base, buf.Bytes())
		packfile.go#L379: 	err = ApplyDelta(obj, base, buf.Bytes())
		parser.go#L231: 		data := buf.Bytes()
		parser.go#L275: 		content := buf.Bytes()
		parser.go#L346: 		base := b.Bytes()
		parser.go#L361: 		copy(data, buf.Bytes())
		parser.go#L382: 	data := buf.Bytes()
		patch_delta.go#L42: 	src := buf.Bytes()
		patch_delta.go#L74: 	return b.Bytes(), nil

	github.com/google/licensecheck/internal/match
		resyntax.go#L99: 	buf := b.Bytes()
		resyntax.go#L123: 			if i > 0 && b.Len() > 0 && b.Bytes()[b.Len()-1] != '\n' {
		resyntax.go#L161: 			if i > 0 && b.Len() > 0 && b.Bytes()[b.Len()-1] != '\n' {

	github.com/google/safehtml/template
		escape.go#L649: 		e.editTextNode(n, b.Bytes())
		escape.go#L828: 		index := bytes.Index(s.Bytes(), jsTemplateSeparator)
		escape.go#L844: 		templateEnd := bytes.Index(s.Bytes(), jsTemplateSeparator)
		escape.go#L845: 		exprStart := bytes.Index(s.Bytes(), jsTemplateExprStart)
		escape.go#L866: 		exprEnd := bytes.Index(s.Bytes(), jsTemplateExprEnd)
		escape.go#L871: 		nestedTemplateStart := bytes.Index(s.Bytes(), jsTemplateSeparator)

	github.com/jackc/pgproto3/v2
		error_response.go#L215: 	binary.BigEndian.PutUint32(buf.Bytes()[1:5], uint32(buf.Len()-1))
		error_response.go#L217: 	return buf.Bytes()

	github.com/jackc/pgtype
		point.go#L198: 		return buff.Bytes(), nil
		uuid.go#L213: 		return buff.Bytes(), nil

	github.com/kevinburke/ssh_config
		config.go#L291: 	return marshal(c).Bytes(), nil

	github.com/lib/pq/scram
		scram.go#L94: 	return c.out.Bytes()
		scram.go#L147: 	c.out.Write(c.authMsg.Bytes())
		scram.go#L242: 	mac.Write(c.authMsg.Bytes())
		scram.go#L258: 	mac.Write(c.authMsg.Bytes())

	github.com/microcosm-cc/bluemonday
		sanitize.go#L73: 	return p.sanitize(bytes.NewReader(b)).Bytes()

	github.com/russross/blackfriday/v2
		block.go#L707: 		block := p.addBlock(CodeBlock, work.Bytes()) // TODO: get rid of temp buffer
		block.go#L1001: 	p.block(raw.Bytes())
		block.go#L1048: 	workbytes := work.Bytes()
		block.go#L1059: 	block := p.addBlock(CodeBlock, work.Bytes()) // TODO: get rid of temp buffer
		block.go#L1395: 	rawBytes := raw.Bytes()
		html.go#L512: 			r.sr.Process(w, tmp.Bytes())
		html.go#L945: 		w.Write(buf.Bytes())
		inline.go#L432: 				id = b.Bytes()
		inline.go#L472: 			id = b.Bytes()
		inline.go#L539: 			uLink = uLinkBuf.Bytes()
		inline.go#L641: 				link := uLink.Bytes()
		inline.go#L893: 		node.Destination = uLink.Bytes()
		inline.go#L894: 		node.AppendChild(text(uLink.Bytes()))
		markdown.go#L395: 	return buf.Bytes()
		markdown.go#L792: 	contents = raw.Bytes()
		smartypants.go#L450: 			w.Write(tmp.Bytes())

	github.com/yuin/goldmark/ast
		ast.go#L383: 	return buf.Bytes()

	github.com/yuin/goldmark/parser
		attribute.go#L226: 			return buf.Bytes(), true

	go/ast
		commentmap.go#L306: 	bytes := buf.Bytes()

	go/format
		format.go#L77: 		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#L35: 				return s.Bytes(), nil

	go/printer
		nodes.go#L1671: 		for _, ch := range buf.Bytes() {

	golang.org/x/crypto/openpgp/packet
		private_key.go#L184: 	contents := buf.Bytes()
		private_key.go#L185: 	privateKeyBytes := privateKeyBuf.Bytes()
		symmetric_key_encrypted.go#L118: 	s2kBytes := s2kBuf.Bytes()
		userattribute.go#L47: 			Contents: buf.Bytes()})
		userattribute.go#L77: 	_, err = w.Write(buf.Bytes())

	golang.org/x/crypto/ssh
		keys.go#L289: 	return b.Bytes()
		session.go#L325: 	return b.Bytes(), err
		session.go#L352: 	return b.b.Bytes(), err

	golang.org/x/mod/modfile
		print.go#L19: 	return pr.Bytes()
		print.go#L36: 	b := p.Bytes()
		print.go#L71: 	b := p.Bytes()

	golang.org/x/net/http2
		transport.go#L1625: 	return cc.hbuf.Bytes(), nil
		transport.go#L1673: 	return cc.hbuf.Bytes(), nil
		write.go#L229: 	headerBlock := buf.Bytes()
		write.go#L278: 	headerBlock := buf.Bytes()
		write.go#L309: 		BlockFragment: buf.Bytes(),

	golang.org/x/net/http2/hpack
		hpack.go#L257: 		d.buf = d.saveBuf.Bytes()
		huffman.go#L28: 	return w.Write(buf.Bytes())

	golang.org/x/pkgsite/internal/fetch
		fetchlocal.go#L162: 	reader := bytes.NewReader(buf.Bytes())

	golang.org/x/pkgsite/internal/frontend
		overview.go#L202: 		return buf.Bytes(), nil
		readme.go#L158: 	s := string(p.SanitizeBytes(b.Bytes()))
		server.go#L508: 	return buf.Bytes(), nil

	golang.org/x/pkgsite/internal/godoc
		encode.go#L71: 	return buf.Bytes(), nil
		encode.go#L112: 	return buf.Bytes(), nil

	golang.org/x/pkgsite/internal/godoc/codec
		generate.go#L338: 	return buf.Bytes(), nil

	golang.org/x/pkgsite/internal/godoc/dochtml/internal/render
		linkify.go#L407: 	src := b.Bytes()

	golang.org/x/pkgsite/internal/middleware
		caching.go#L200: 	if err := c.cache.Put(setCtx, key, rec.buf.Bytes(), ttl); err != nil {

	golang.org/x/pkgsite/internal/stdlib
		stdlib.go#L356: 	br := bytes.NewReader(buf.Bytes())

	golang.org/x/pkgsite/internal/testing/testhelper
		testhelper.go#L101: 	return bs.Bytes(), nil

	golang.org/x/tools/txtar
		archive.go#L64: 	return buf.Bytes()

	google.golang.org/api/googleapi
		googleapi.go#L350: 	return json.Unmarshal(buf.Bytes(), dst) == nil

	google.golang.org/api/internal/gensupport
		media.go#L331: 		buf := r.Bytes()

	google.golang.org/grpc
		rpc_util.go#L576: 	return cbuf.Bytes(), nil
		rpc_util.go#L689: 			return buf.Bytes(), int(bytesRead), err

	html/template
		escape.go#L710: 		e.editTextNode(n, b.Bytes())

	mime/multipart
		formdata.go#L108: 			fh.content = b.Bytes()

	net/http
		h2_bundle.go#L8128: 	return cc.hbuf.Bytes(), nil
		h2_bundle.go#L8176: 	return cc.hbuf.Bytes(), nil
		h2_bundle.go#L9479: 	headerBlock := buf.Bytes()
		h2_bundle.go#L9528: 	headerBlock := buf.Bytes()
		h2_bundle.go#L9559: 		BlockFragment: buf.Bytes(),
		request.go#L891: 			buf := v.Bytes()
		server.go#L3333: 		w.Write(tw.wbuf.Bytes())

	net/http/httptest
		recorder.go#L182: 		res.Body = io.NopCloser(bytes.NewReader(rw.Body.Bytes()))

	net/http/httputil
		dump.go#L37: 	return io.NopCloser(&buf), io.NopCloser(bytes.NewReader(buf.Bytes())), nil
		dump.go#L155: 	dump := buf.Bytes()
		dump.go#L288: 	return b.Bytes(), nil
		dump.go#L339: 	return b.Bytes(), nil

	os/exec
		exec.go#L552: 	return stdout.Bytes(), err
		exec.go#L568: 	return b.Bytes(), err
		exec.go#L728: 	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())