MCPcopy Create free account
hub / github.com/valyala/bytebufferpool / Write

Method Write

bytebuffer.go:72–75  ·  view source on GitHub ↗

Write implements io.Writer - it appends p to ByteBuffer.B

(p []byte)

Source from the content-addressed store, hash-verified

70
71// Write implements io.Writer - it appends p to ByteBuffer.B
72func (b *ByteBuffer) Write(p []byte) (int, error) {
73 b.B = append(b.B, p...)
74 return len(p), nil
75}
76
77// WriteByte appends the byte c to the buffer.
78//

Callers 4

BenchmarkByteBufferWriteFunction · 0.95
ExampleByteBufferFunction · 0.80
WriteToMethod · 0.80

Calls

no outgoing calls

Tested by 3

BenchmarkByteBufferWriteFunction · 0.76
ExampleByteBufferFunction · 0.64