Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry[KEY comparable, ITEM any] interface { // Register adds the given item to the registry. // It overwrites any existing item associated with the same key. Register(key KEY, item ITEM) // Get returns the item associated with the given key. // If no such key exists, it returns an error. Get(key KEY) (ITEM, error) // Range calls f for each item in the registry. Range(f func(key KEY, item ITEM) bool) }
Registry is a generic registry that stores items indexed by keys.
Click to show internal directories.
Click to hide internal directories.