TruncatingByteSliceSink returns a Sink that writes up to len(*dst) bytes to *dst. If more bytes are available, they're silently truncated. If fewer bytes are available than len(*dst), *dst is shrunk to fit the number of bytes available.
(dst *[]byte)
| 271 | // truncated. If fewer bytes are available than len(*dst), *dst |
| 272 | // is shrunk to fit the number of bytes available. |
| 273 | func TruncatingByteSliceSink(dst *[]byte) Sink { |
| 274 | return &truncBytesSink{dst: dst} |
| 275 | } |
| 276 | |
| 277 | type truncBytesSink struct { |
| 278 | dst *[]byte |
no outgoing calls
searching dependent graphs…