buffer

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2018 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	BS []byte
	// contains filtered or unexported fields
}

Buffer is main type for buffer

func (*Buffer) Bytes

func (b *Buffer) Bytes() []byte

Bytes return current bytes

func (*Buffer) Free

func (b *Buffer) Free()

Free will Release Buffer to pool

func (*Buffer) Grow added in v0.2.3

func (b *Buffer) Grow(n int)

func (*Buffer) Len

func (b *Buffer) Len() int

func (*Buffer) Reset added in v0.2.3

func (b *Buffer) Reset()

Reset bytes buffer

func (*Buffer) String

func (b *Buffer) String() string

func (*Buffer) Write added in v0.2.3

func (b *Buffer) Write(bs []byte) (int, error)

Write bytes to buffer

func (*Buffer) WriteByte added in v0.2.3

func (b *Buffer) WriteByte(v byte) error

WriteByte will write a Byte

func (*Buffer) WriteString added in v0.2.3

func (b *Buffer) WriteString(s string) error

WriteString will string string as []byte

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

Pool is struct for buffer pool

func NewPool

func NewPool() Pool

NewPool Generate new buffer pool

func (Pool) Get

func (p Pool) Get() *Buffer

Get new buffer from pool

Jump to

Keyboard shortcuts

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