bufferpool

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 3 Imported by: 0

README

bufferpool

import "github.com/fufuok/utils/pools/bufferpool"

Index

func Get

func Get() *bytes.Buffer

func New

func New(bs []byte) *bytes.Buffer

func NewByte

func NewByte(c byte) *bytes.Buffer

func NewRune

func NewRune(r rune) *bytes.Buffer

func NewString

func NewString(s string) *bytes.Buffer

func Put

func Put(buf *bytes.Buffer)

func Release

func Release(buf *bytes.Buffer) bool

func SetMaxSize

func SetMaxSize(size int) bool

SetMaxSize 设置回收时允许的最大字节 smallBufferSize is an initial allocation minimal capacity. const smallBufferSize = 64

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() *bytes.Buffer

func New

func New(bs []byte) *bytes.Buffer

func NewByte added in v0.3.10

func NewByte(c byte) *bytes.Buffer

func NewRune added in v0.3.10

func NewRune(r rune) *bytes.Buffer

func NewString

func NewString(s string) *bytes.Buffer

func Put

func Put(buf *bytes.Buffer)

func Release

func Release(buf *bytes.Buffer) bool

func SetMaxSize added in v0.3.12

func SetMaxSize(size int) bool

SetMaxSize 设置回收时允许的最大字节

Types

This section is empty.

Jump to

Keyboard shortcuts

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