utils

package
v0.18.0-preview-2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotNilDefault added in v0.18.0

func NotNilDefault(b *bool, def *bool) *bool

Types

type LimitedBuffer

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

LimitedBuffer stores only last 'limit' bytes written to it

func NewLimitedBuffer

func NewLimitedBuffer(limit int) *LimitedBuffer

NewLimitedBuffer returns new LimitedBuffer

func (*LimitedBuffer) String

func (b *LimitedBuffer) String() string

String returns string representation of buffer.

func (*LimitedBuffer) Write

func (b *LimitedBuffer) Write(p []byte) (n int, err error)

Write writes len(p) bytes from p to the buffer, pushing out previously written bytes if they don't fit into buffer. Always returns len(p).

Jump to

Keyboard shortcuts

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