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 not stored for this graph (policy: none)