mirror of
https://github.com/acme-dns/acme-dns.git
synced 2026-03-01 02:14:25 -07:00
Update dependencies (#32)
This commit is contained in:
21
vendor/github.com/valyala/bytebufferpool/bytebuffer_example_test.go
generated
vendored
Normal file
21
vendor/github.com/valyala/bytebufferpool/bytebuffer_example_test.go
generated
vendored
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user