MCPcopy
hub / github.com/uber-go/zap / Get

Method Get

buffer/pool.go:44–49  ·  view source on GitHub ↗

Get retrieves a Buffer from the pool, creating one if necessary.

()

Source from the content-addressed store, hash-verified

42
43// Get retrieves a Buffer from the pool, creating one if necessary.
44func (p Pool) Get() *Buffer {
45 buf := p.p.Get()
46 buf.Reset()
47 buf.pool = p
48 return buf
49}
50
51func (p Pool) put(buf *Buffer) {
52 p.p.Put(buf)

Callers 6

TestBuffersFunction · 0.95
serveHTTPMethod · 0.45
checkMethod · 0.45
MarshalLogArrayMethod · 0.45
TestBufferWritesFunction · 0.45
BenchmarkBuffersFunction · 0.45

Calls 1

ResetMethod · 0.80

Tested by 3

TestBuffersFunction · 0.76
TestBufferWritesFunction · 0.36
BenchmarkBuffersFunction · 0.36