package
Version:
v0.2.6
Opens a new window with list of versions in this module.
Published: Oct 13, 2025
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Registry[F any] interface {
Get(name string) (F, bool)
Register(name string, factory F)
RegisteredFactories() map[string]F
Reset()
}
Registry defines the interface for managing factory functions.
It allows for registering and retrieving factory functions by name.
New creates and returns a new instance of the registry.
This is the entry point for creating a registry for factory functions.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.