Documentation ¶
Index ¶
- func Command(parent *cobra.Command, prereq Module, skeleton cobra.Command, body interface{}, ...) *cobra.Command
- func Describe(m Module) string
- func Fail(err error)
- func ReuseCommand(parent *cobra.Command, existing *cobra.Command) *cobra.Command
- type Edge
- type Graph
- type Module
- type ModuleBundle
- type ModuleHooks
- type NamedModule
- type Option
- type Registry
- type RunContext
- type Runnable
- type UseContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ModuleBundle ¶
type ModuleBundle struct {
Modules []Module
}
func Modules ¶
func Modules(ms ...Module) *ModuleBundle
func (*ModuleBundle) ModuleName ¶
func (m *ModuleBundle) ModuleName() string
func (*ModuleBundle) OnRegister ¶
func (m *ModuleBundle) OnRegister(h ModuleHooks)
type ModuleHooks ¶
type NamedModule ¶
type NamedModule interface {
ModuleName() string
}
type RunContext ¶
type RunContext struct {
// contains filtered or unexported fields
}
func Use ¶
func Use(module Module, options ...Option) *RunContext
func (*RunContext) Run ¶
func (r *RunContext) Run(body func() error)
type UseContext ¶
func (UseContext) Use ¶
func (u UseContext) Use(mod Module, newOptions ...Option)
Click to show internal directories.
Click to hide internal directories.