MCPcopy Create free account
hub / github.com/corestoreio/pkg / Put

Method Put

util/bufferpool/bufpool.go:60–75  ·  view source on GitHub ↗

Put empties the buffer and returns it back to the pool. bp := New(320) buf := bp.Get() defer bp.Put(buf) // your code return buf.String() If you use Bytes() function to return bytes make sure you copy the data away otherwise your returned byte slice will be empty. For using String() no c

(buf *bytes.Buffer)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

TestBufferPoolSizeFunction · 0.45
PutReaderFunction · 0.45
PutFunction · 0.45

Calls 1

ResetMethod · 0.45

Tested by 1

TestBufferPoolSizeFunction · 0.36