fields

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fields

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

func New

func New() *Fields

func (*Fields) Clear

func (f *Fields) Clear() *Fields

Clear removes all keys from the fields

func (*Fields) Copy

func (f *Fields) Copy() *Fields

Copy returns a copy of the fields

func (*Fields) Data

func (f *Fields) Data() map[string]any

Data returns the fields as a map

func (*Fields) Delete

func (f *Fields) Delete(key string) *Fields

Delete removes a key from the fields

func (*Fields) Get

func (f *Fields) Get(key string) any

Get returns the value of a key in the fields

func (*Fields) IsEmpty

func (f *Fields) IsEmpty() bool

IsEmpty returns true if the fields are empty

func (*Fields) Len

func (f *Fields) Len() int

Len returns the number of keys in the fields

func (*Fields) Merge

func (f *Fields) Merge(fields *Fields) *Fields

Merge merges the fields with another fields

func (*Fields) Set

func (f *Fields) Set(key string, value any) *Fields

Set sets a key-value pair in the fields

func (*Fields) SetMap

func (f *Fields) SetMap(fields map[string]any) *Fields

SetMap sets a map of key-value pairs in the fields

Jump to

Keyboard shortcuts

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