A Buffer is a variable-sized buffer of bytes with Read and Write methods. The zero value for Buffer is an empty buffer ready to use.
| 75 | // A Buffer is a variable-sized buffer of bytes with Read and Write methods. |
| 76 | // The zero value for Buffer is an empty buffer ready to use. |
| 77 | type Buffer struct { |
| 78 | buf []byte // contents are the bytes buf[off : len(buf)] |
| 79 | off int // read at &buf[off], write at &buf[len(buf)] |
| 80 | runeBytes [utf8.UTFMax]byte // avoid allocation of slice on each WriteByte or Rune |
| 81 | encoder *json.Encoder |
| 82 | skipTrailingByte bool |
| 83 | } |
| 84 | |
| 85 | // ErrTooLarge is passed to panic if memory cannot be allocated to store data in a buffer. |
| 86 | var ErrTooLarge = errors.New("fflib.v1.Buffer: too large") |
nothing calls this directly
no outgoing calls
no test coverage detected