NewSpill returns a Buffer which writes data to w when there's an error writing to buf. Such as when buf is full, or the disk is full, etc.
(buf Buffer, w io.Writer)
| 15 | // NewSpill returns a Buffer which writes data to w when there's an error |
| 16 | // writing to buf. Such as when buf is full, or the disk is full, etc. |
| 17 | func NewSpill(buf Buffer, w io.Writer) Buffer { |
| 18 | if w == nil { |
| 19 | w = ioutil.Discard |
| 20 | } |
| 21 | return &spill{ |
| 22 | Buffer: buf, |
| 23 | Spiller: w, |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | func (buf *spill) Cap() int64 { |
| 28 | return math.MaxInt64 |
no outgoing calls
searching dependent graphs…