MCPcopy
hub / github.com/coder/websocket / getBufioWriter

Function getBufioWriter

dial.go:336–343  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

334var bufioWriterPool sync.Pool
335
336func 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
345func putBufioWriter(bw *bufio.Writer) {
346 bufioWriterPool.Put(bw)

Callers 1

dialFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…