logfield

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidKey   = errors.New("invalid key: must be [A-Za-z0-9_]+")
	ErrInvalidValue = errors.New("invalid value: must not contain spaces or '='")
)

Functions

This section is empty.

Types

type Fields

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

Fields is a validated key=value annotation set.

func New

func New(capacity int) *Fields

func Parse

func Parse(s string, capacity int) (*Fields, error)

func (*Fields) Get

func (f *Fields) Get(key string) (string, bool)

func (*Fields) MustPut

func (f *Fields) MustPut(key, value string) *Fields

func (*Fields) Put

func (f *Fields) Put(key, value string) error

func (*Fields) String

func (f *Fields) String() string

func (*Fields) StringSorted

func (f *Fields) StringSorted() string

Jump to

Keyboard shortcuts

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