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

Method Reset

buffer/buffer.go:104–106  ·  view source on GitHub ↗

Reset resets the underlying byte slice. Subsequent writes re-use the slice's backing array.

()

Source from the content-addressed store, hash-verified

102// Reset resets the underlying byte slice. Subsequent writes re-use the slice's
103// backing array.
104func (b *Buffer) Reset() {
105 b.bs = b.bs[:0]
106}
107
108// Write implements io.Writer.
109func (b *Buffer) Write(bs []byte) (int, error) {

Callers 7

BenchmarkBuffersFunction · 0.95
flushMethod · 0.80
resetReflectBufMethod · 0.80
truncateMethod · 0.80
TestLevelAsFlagValueFunction · 0.80
GetMethod · 0.80
TestBufferWritesFunction · 0.80

Calls

no outgoing calls

Tested by 3

BenchmarkBuffersFunction · 0.76
TestLevelAsFlagValueFunction · 0.64
TestBufferWritesFunction · 0.64