bytes.Buffer.Len (method)

79 uses

	bytes (current package)
		buffer.go#L73: func (b *Buffer) Len() int { return len(b.buf) - b.off }
		buffer.go#L88: 	if n < 0 || n > b.Len() {
		buffer.go#L118: 	m := b.Len()
		buffer.go#L238: 	if nBytes := b.Len(); nBytes > 0 {
		buffer.go#L320: 	m := b.Len()

	crypto/tls
		conn.go#L609: 		if err == io.ErrUnexpectedEOF && c.rawInput.Len() == 0 {
		conn.go#L678: 	if c.vers == VersionTLS13 && typ != recordTypeHandshake && c.hand.Len() > 0 {
		conn.go#L711: 		if c.hand.Len() > 0 {
		conn.go#L790: 	if c.rawInput.Len() >= n {
		conn.go#L793: 	needs := n - c.rawInput.Len()
		conn.go#L1007: 	for c.hand.Len() < 4 {
		conn.go#L1019: 	for c.hand.Len() < 4+n {
		conn.go#L1279: 		for c.hand.Len() > 0 {
		conn.go#L1295: 	if n != 0 && c.input.Len() == 0 && c.rawInput.Len() > 0 &&

	encoding/json
		indent.go#L18: 	origLen := dst.Len()
		indent.go#L82: 	origLen := dst.Len()

	encoding/xml
		xml.go#L758: 				d.buf.Truncate(d.buf.Len() - 1)
		xml.go#L935: 	n := d.saved.Len()
		xml.go#L1022: 			before := d.buf.Len()
		xml.go#L1043: 				start := d.buf.Len()

	github.com/go-git/go-git/v5/plumbing/format/packfile
		diff_delta.go#L142: 	if ibuf.Len() == 0 {
		diff_delta.go#L147: 	s := ibuf.Len()
		parser.go#L360: 		data := make([]byte, buf.Len())
		patch_delta.go#L53: 	target.SetSize(int64(dst.Len()))

	github.com/go-git/go-git/v5/plumbing/transport/http
		common.go#L30: 	req.Header.Add("Content-Length", strconv.Itoa(content.Len()))

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

	github.com/google/safehtml
		urlset.go#L54: 			if buffer.Len() != 0 {
		urlset.go#L74: 	if buffer.Len() == 0 {

	github.com/jackc/pgproto3/v2
		copy_both_response.go#L24: 	if buf.Len() < 3 {
		copy_both_response.go#L31: 	if buf.Len() != columnCount*2 {
		copy_in_response.go#L24: 	if buf.Len() < 3 {
		copy_in_response.go#L31: 	if buf.Len() != columnCount*2 {
		copy_out_response.go#L23: 	if buf.Len() < 3 {
		copy_out_response.go#L30: 	if buf.Len() != columnCount*2 {
		error_response.go#L215: 	binary.BigEndian.PutUint32(buf.Bytes()[1:5], uint32(buf.Len()-1))
		execute.go#L30: 	if buf.Len() < 4 {
		parameter_description.go#L23: 	if buf.Len() < 2 {
		parameter_description.go#L30: 	parameterCount := buf.Len() / 4
		parse.go#L39: 	if buf.Len() < 2 {
		parse.go#L45: 		if buf.Len() < 4 {

	github.com/jackc/pgtype
		array.go#L218: 	if buf.Len() > 0 {
		range.go#L107: 	if buf.Len() > 0 {

	github.com/lib/pq/scram
		scram.go#L91: 	if c.out.Len() == 0 {

	github.com/prometheus/common/expfmt
		text_parse.go#L226: 	if p.currentToken.Len() == 0 {
		text_parse.go#L280: 	if p.currentToken.Len() == 0 {
		text_parse.go#L474: 	if p.currentToken.Len() > 0 {

	github.com/russross/blackfriday/v2
		block.go#L1342: 				sublist = raw.Len()
		html.go#L943: 	if buf.Len() > 0 {
		html.go#L948: 	r.lastOutputLen = buf.Len()
		inline.go#L640: 			if uLink.Len() > 0 {
		inline.go#L891: 	if uLink.Len() > 0 {

	github.com/yuin/goldmark/parser
		attribute.go#L260: 	if buf.Len() == 0 {

	go/ast
		commentmap.go#L292: 			if buf.Len() >= maxLen {
		commentmap.go#L300: 	if buf.Len() > maxLen {

	go/printer
		nodes.go#L1670: 	if buf.Len() <= maxSize {
		nodes.go#L1676: 		size = buf.Len() // n fits

	golang.org/x/crypto/openpgp/packet
		userattribute.go#L74: 	if err = serializeHeader(w, packetTypeUserAttribute, buf.Len()); err != nil {

	golang.org/x/net/http2
		frame.go#L1588: 			buf.Truncate(buf.Len() - 1) // remove trailing comma

	golang.org/x/net/http2/hpack
		hpack.go#L236: 	if d.saveBuf.Len() > 0 {
		hpack.go#L253: 	if d.saveBuf.Len() == 0 {
		huffman.go#L67: 				if maxLen != 0 && buf.Len() == maxLen {
		huffman.go#L87: 		if maxLen != 0 && buf.Len() == maxLen {

	golang.org/x/pkgsite/internal/frontend
		goldmark.go#L293: 			if buffer.Len() == 0 {

	golang.org/x/pkgsite/internal/godoc/dochtml/internal/render
		linkify.go#L409: 	file := fset.AddFile("", fset.Base(), b.Len())

	golang.org/x/pkgsite/internal/middleware
		caching.go#L197: 	log.Infof(ctx, "caching response of length %d for %s", rec.buf.Len(), key)

	google.golang.org/grpc/internal/transport
		controlbuf.go#L676: 		size := l.hBuf.Len()
		transport.go#L162: 		if r.last.Len() == 0 {
		transport.go#L218: 	if m.buffer.Len() == 0 {

	net/http
		h2_bundle.go#L2831: 			buf.Truncate(buf.Len() - 1) // remove trailing comma
		request.go#L890: 			req.ContentLength = int64(v.Len())

	net/http/httptest
		httptest.go#L57: 			req.ContentLength = int64(v.Len())

	vendor/golang.org/x/net/http2/hpack
		hpack.go#L236: 	if d.saveBuf.Len() > 0 {
		hpack.go#L253: 	if d.saveBuf.Len() == 0 {
		huffman.go#L67: 				if maxLen != 0 && buf.Len() == maxLen {
		huffman.go#L87: 		if maxLen != 0 && buf.Len() == maxLen {