pool

package
v0.10.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBuffer

func GetBuffer(size int) []byte

GetBuffer gets a buffer from pool, size should in range: [1, 65536], otherwise, this function will call make([]byte, size) directly.

func GetWriteBuffer

func GetWriteBuffer() *bytes.Buffer

GetWriteBuffer returns a bytes.buffer from pool.

func PutBuffer

func PutBuffer(buf []byte)

PutBuffer puts a buffer into pool.

func PutWriteBuffer

func PutWriteBuffer(buf *bytes.Buffer)

PutWriteBuffer puts a bytes.buffer into pool.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL