utils

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound      = errors.New("key not found")
	ErrAlreadyExists = errors.New("entry with the same name already exists")
)

Functions

This section is empty.

Types

type Registry

type Registry[T any] interface {
	Add(key string, value T) error
	Get(key string) (T, error)
	MustRegister(key string, value T)
}

func NewRegistry

func NewRegistry[T any]() Registry[T]

Jump to

Keyboard shortcuts

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