3 Star 0 Fork 0

Gitee 极速下载 / bytebufferpool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/valyala/bytebufferpool
克隆/下载
bytebuffer_example_test.go 396 Bytes
AI 代码解读
一键复制 编辑 原始数据 按行查看 历史
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)
}
1
https://gitee.com/mirrors/bytebufferpool.git
git@gitee.com:mirrors/bytebufferpool.git
mirrors
bytebufferpool
bytebufferpool
master

搜索帮助