buffer

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package buffer provides a pool-allocated byte buffer with custom methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer []byte

buffer adapted from go/src/fmt/print.go

func New

func New() *Buffer

func (*Buffer) Free

func (b *Buffer) Free()

func (*Buffer) Reset

func (b *Buffer) Reset()

func (*Buffer) String

func (b *Buffer) String() string

func (*Buffer) Write

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

func (*Buffer) WriteBool

func (b *Buffer) WriteBool(v bool)

func (*Buffer) WriteByte

func (b *Buffer) WriteByte(c byte)

func (*Buffer) WriteFloat

func (b *Buffer) WriteFloat(v float64) error

func (*Buffer) WriteInt

func (b *Buffer) WriteInt(i int64)

func (*Buffer) WriteJson

func (b *Buffer) WriteJson(v any) error

func (*Buffer) WriteQuoted

func (b *Buffer) WriteQuoted(s string)

func (*Buffer) WriteString

func (b *Buffer) WriteString(s string)

func (*Buffer) WriteText

func (b *Buffer) WriteText(v encoding.TextMarshaler) error

func (*Buffer) WriteUint

func (b *Buffer) WriteUint(i uint64)

Jump to

Keyboard shortcuts

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