Documentation
¶
Overview ¶
Package registry holds the type-erased entries built by spec.Define and hands them to the transport frontends. Registration validates name uniqueness eagerly so collisions surface at startup, not at first call.
The package also owns the process-wide default registry (Default): the one-main-entry program registers into it via spec.Command[T].RegisterDefault() and lets xyz.Main() dispatch it, with no registry construction or import in user code. Programs that need several registries (or test isolation) keep using New with the explicit Register / Run variants.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Default = New()
Default is the process-wide registry behind spec.RegisterDefault and xyz.Main. Programs rarely need to touch it directly.
Functions ¶
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is the central command table shared by every frontend.