Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(core): fix staticcheck issues #15140

Merged
merged 2 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/appconfig/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"cosmossdk.io/core/appmodule"
"cosmossdk.io/core/internal"
"cosmossdk.io/core/internal/testpb"
_ "cosmossdk.io/core/internal/testpb"
)

func expectContainerErrorContains(t *testing.T, option depinject.Config, contains string) {
Expand Down
8 changes: 2 additions & 6 deletions core/appmodule/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}
Expand All @@ -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
})
}