chore(core): fix staticcheck issues (#15140)

This commit is contained in:
Mark Rushakoff
2023-02-23 20:14:47 +00:00
committed by GitHub
parent b378be9e31
commit 79b74ff121
2 changed files with 2 additions and 7 deletions
+2 -6
View File
@@ -20,9 +20,7 @@ func (f funcOption) apply(initializer *internal.ModuleInitializer) error {
// documentation on the dependency injection system.
func Provide(providers ...interface{}) Option {
return funcOption(func(initializer *internal.ModuleInitializer) error {
for _, provider := range providers {
initializer.Providers = append(initializer.Providers, provider)
}
initializer.Providers = append(initializer.Providers, providers...)
return nil
})
}
@@ -33,9 +31,7 @@ func Provide(providers ...interface{}) Option {
// invokers impose no additional constraints on the dependency graph. Invoker functions should nil-check all inputs.
func Invoke(invokers ...interface{}) Option {
return funcOption(func(initializer *internal.ModuleInitializer) error {
for _, invoker := range invokers {
initializer.Invokers = append(initializer.Invokers, invoker)
}
initializer.Invokers = append(initializer.Invokers, invokers...)
return nil
})
}