fix: lifecycle setup needs to return nil

This commit is contained in:
Derrick Hammer 2024-01-30 14:53:50 -05:00
parent 64c3795876
commit 883504225e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 6 additions and 2 deletions

View File

@ -38,7 +38,7 @@ type LifecyclesParams struct {
Protocols []registry.API `group:"protocol"` Protocols []registry.API `group:"protocol"`
} }
func SetupLifecycles(lifecycle fx.Lifecycle, params LifecyclesParams) { func SetupLifecycles(lifecycle fx.Lifecycle, params LifecyclesParams) error {
for _, entry := range registry.GetRegistry() { for _, entry := range registry.GetRegistry() {
for _, protocol := range params.Protocols { for _, protocol := range params.Protocols {
if protocol.Name() == entry.Key { if protocol.Name() == entry.Key {
@ -53,4 +53,6 @@ func SetupLifecycles(lifecycle fx.Lifecycle, params LifecyclesParams) {
} }
} }
} }
return nil
} }

View File

@ -38,7 +38,7 @@ type LifecyclesParams struct {
Protocols []registry.Protocol `group:"protocol"` Protocols []registry.Protocol `group:"protocol"`
} }
func SetupLifecycles(lifecycle fx.Lifecycle, params LifecyclesParams) { func SetupLifecycles(lifecycle fx.Lifecycle, params LifecyclesParams) error {
for _, entry := range registry.GetRegistry() { for _, entry := range registry.GetRegistry() {
for _, protocol := range params.Protocols { for _, protocol := range params.Protocols {
if protocol.Name() == entry.Key { if protocol.Name() == entry.Key {
@ -53,4 +53,6 @@ func SetupLifecycles(lifecycle fx.Lifecycle, params LifecyclesParams) {
} }
} }
} }
return nil
} }