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.
()
| 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. |
| 53 | func (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. |
| 62 | func (s BufferSlice) Ref() { |
no test coverage detected