linker

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 6 Imported by: 13 modules, 10 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Linker

type Linker[T comparable, I any] struct {
	// contains filtered or unexported fields
}

func NewLinker

func NewLinker[T comparable, I any](options ...Option[T, I]) *Linker[T, I]

func (*Linker[T, I]) Add

func (linker *Linker[T, I]) Add(key T, value I)

func (*Linker[T, I]) All

func (linker *Linker[T, I]) All() iter.Seq2[T, I]

func (*Linker[T, I]) Clone added in v0.0.17

func (linker *Linker[T, I]) Clone() *Linker[T, I]

func (*Linker[T, I]) Difference added in v0.0.17

func (linker *Linker[T, I]) Difference(l *Linker[T, I]) *Linker[T, I]

func (*Linker[T, I]) Get

func (linker *Linker[T, I]) Get(key T) (I, error)

func (*Linker[T, I]) GetOrDefault

func (linker *Linker[T, I]) GetOrDefault(key T, d I) I

func (*Linker[T, I]) Has

func (linker *Linker[T, I]) Has(key T) bool

func (*Linker[T, I]) HasAllAnd added in v0.0.17

func (linker *Linker[T, I]) HasAllAnd(items ...T) bool

func (*Linker[T, I]) HasAllOr added in v0.0.17

func (linker *Linker[T, I]) HasAllOr(items ...T) bool

func (*Linker[T, I]) Intersection added in v0.0.17

func (linker *Linker[T, I]) Intersection(l *Linker[T, I]) *Linker[T, I]

func (*Linker[T, I]) Keys added in v0.0.8

func (linker *Linker[T, I]) Keys() []T

func (*Linker[T, I]) Len added in v0.0.7

func (linker *Linker[T, I]) Len() int

func (*Linker[T, I]) Remove

func (linker *Linker[T, I]) Remove(key T)

func (*Linker[T, I]) Reset added in v0.0.11

func (linker *Linker[T, I]) Reset()

type Normalizer added in v0.0.14

type Normalizer[T comparable] func(key T) T

type Option added in v0.0.14

type Option[T comparable, I any] func(l *Linker[T, I])

func KeyStringNormalizer added in v0.0.14

func KeyStringNormalizer[I any]() Option[string, I]
func Link[T comparable, I any](key T, val I) Option[T, I]

func WithNormalizer added in v0.0.14

func WithNormalizer[T comparable, I any](normalizer Normalizer[T]) Option[T, I]

Jump to

Keyboard shortcuts

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