MCPcopy
hub / github.com/grpc/grpc-go / Len

Method Len

mem/buffer_slice.go:53–59  ·  view source on GitHub ↗

Len returns the sum of the length of all the Buffers in this slice. # Warning Invoking the built-in len on a BufferSlice will return the number of buffers in the slice, and *not* the value returned by this function.

()

Source from the content-addressed store, hash-verified

51// Invoking the built-in len on a BufferSlice will return the number of buffers
52// in the slice, and *not* the value returned by this function.
53func (s BufferSlice) Len() int {
54 var length int
55 for _, b := range s {
56 length += b.Len()
57 }
58 return length
59}
60
61// Ref invokes Ref on each buffer in the slice.
62func (s BufferSlice) Ref() {

Callers 3

MaterializeMethod · 0.95
MaterializeToBufferMethod · 0.95
ReaderMethod · 0.95

Calls 1

LenMethod · 0.65

Tested by

no test coverage detected