internal/component: Update documentation and linting
This commit is contained in:
parent
84974dd712
commit
a63e656f69
2 changed files with 64 additions and 49 deletions
|
|
@ -32,6 +32,7 @@ type ComponentBase struct {
|
|||
Core // the core of the associated distillery
|
||||
}
|
||||
|
||||
//lint:ignore U1000 used to implement the private methods of [Component]
|
||||
func (cb *ComponentBase) getBase() *ComponentBase {
|
||||
return cb
|
||||
}
|
||||
|
|
@ -42,7 +43,8 @@ func (cb *ComponentBase) getBase() *ComponentBase {
|
|||
//
|
||||
// dis is the distillery to initialize components for
|
||||
// field is a pointer to the appropriate struct field within the distillery components
|
||||
// init is called with a new non-nil component to initialize it. It may be nil, to indicate no initialization is required.
|
||||
// init is called with a new non-nil component to initialize it.
|
||||
// It may be nil, to indicate no additional initialization is required.
|
||||
//
|
||||
// makeComponent returns the new or existing component instance
|
||||
func Initialize[C Component](core Core, field *lazy.Lazy[C], init func(C)) C {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue