(w io.Writer)
| 334 | var bufioWriterPool sync.Pool |
| 335 | |
| 336 | func getBufioWriter(w io.Writer) *bufio.Writer { |
| 337 | bw, ok := bufioWriterPool.Get().(*bufio.Writer) |
| 338 | if !ok { |
| 339 | return bufio.NewWriter(w) |
| 340 | } |
| 341 | bw.Reset(w) |
| 342 | return bw |
| 343 | } |
| 344 | |
| 345 | func putBufioWriter(bw *bufio.Writer) { |
| 346 | bufioWriterPool.Put(bw) |
no outgoing calls
no test coverage detected
searching dependent graphs…