Help us shape the future of Go! Take the 2026 Go Developer Survey

bytespool

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alloc

func Alloc(size int32) []byte

Alloc returns a byte slice with at least the given size. Minimum size of returned slice is 2048.

xray:api:stable

func Free

func Free(b []byte)

Free puts a byte slice into the internal pool.

xray:api:stable

func GetPool

func GetPool(size int32) *sync.Pool

GetPool returns a sync.Pool that generates bytes array with at least the given size. It may return nil if no such pool exists.

xray:api:stable

Types

This section is empty.

Jump to

Keyboard shortcuts

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