component: Automatically determine names

This commit is contained in:
Tom Wiesing 2022-10-17 20:39:53 +02:00
parent 10df1c3243
commit e320bb37bb
No known key found for this signature in database
31 changed files with 84 additions and 113 deletions

View file

@ -19,7 +19,7 @@ import (
// It is the main structure used to interact with different components.
type Distillery struct {
// core holds the core of the distillery
component.Core
component.Still
// internal context for the distillery
context context.Context
@ -54,7 +54,7 @@ func (dis *Distillery) Context() context.Context {
func e[C component.Component](dis *Distillery) C {
return component.ExportComponent[C](
&dis.pool,
dis.Core,
dis.Still,
dis.register,
)
}
@ -62,7 +62,7 @@ func e[C component.Component](dis *Distillery) C {
func ea[C component.Component](dis *Distillery) []C {
return component.ExportComponents[C](
&dis.pool,
dis.Core,
dis.Still,
dis.register,
)
}