buffer

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package buffer defines logger buffer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bytes

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

Bytes represents buffer bytes

func NewBytes

func NewBytes(size int) *Bytes

NewBytes creates bytes

func (*Bytes) AppendBool

func (b *Bytes) AppendBool(v bool)

AppendBool appends a bool to the underlying buffer.

func (*Bytes) AppendByte

func (b *Bytes) AppendByte(bs byte)

AppendByte append a byte

func (*Bytes) AppendBytes

func (b *Bytes) AppendBytes(bs []byte)

AppendBytes append bytes

func (*Bytes) AppendFloat

func (b *Bytes) AppendFloat(f float64, bitSize int)

AppendFloat appends a float to the underlying buffer.

func (*Bytes) AppendInt

func (b *Bytes) AppendInt(i int64)

AppendInt appends an integer to the underlying buffer (assuming base 10).

func (*Bytes) AppendString

func (b *Bytes) AppendString(s string)

AppendString append a string

func (*Bytes) AppendTime

func (b *Bytes) AppendTime(t time.Time, layout string)

AppendTime appends the time formatted using the specified layout.

func (*Bytes) AppendUint

func (b *Bytes) AppendUint(i uint64)

AppendUint appends an unsigned integer to the underlying buffer (assuming base 10).

func (*Bytes) Bytes

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

Bytes return message bytes

func (*Bytes) Reset

func (b *Bytes) Reset()

Reset reset index

func (*Bytes) Size

func (b *Bytes) Size() int

Size return size

func (*Bytes) Trim

func (b *Bytes) Trim(ch byte)

Trim trims any final character from the buffer

func (*Bytes) WriteTo

func (b *Bytes) WriteTo(w io.Writer) (int64, error)

WriteTo writes to writer

Jump to

Keyboard shortcuts

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