Squashing history

This commit is contained in:
Philipp P Egli
2018-02-16 12:45:13 -07:00
committed by Benjamin J Cane
commit bb69943505
308 changed files with 71070 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
package bytebufferpool_test
import (
"fmt"
"github.com/valyala/bytebufferpool"
)
func ExampleByteBuffer() {
bb := bytebufferpool.Get()
bb.WriteString("first line\n")
bb.Write([]byte("second line\n"))
bb.B = append(bb.B, "third line\n"...)
fmt.Printf("bytebuffer contents=%q", bb.B)
// It is safe to release byte buffer now, since it is
// no longer used.
bytebufferpool.Put(bb)
}