diff --git a/depinject/binding_test.go b/depinject/binding_test.go index 4608dc36d2..c7dccb4fde 100644 --- a/depinject/binding_test.go +++ b/depinject/binding_test.go @@ -25,9 +25,11 @@ type Duck interface { quack() } -type Mallard struct{} -type Canvasback struct{} -type Marbled struct{} +type ( + Mallard struct{} + Canvasback struct{} + Marbled struct{} +) func (duck Mallard) quack() {} func (duck Canvasback) quack() {} diff --git a/depinject/errors.go b/depinject/errors.go index 145ce548a8..be4fec4870 100644 --- a/depinject/errors.go +++ b/depinject/errors.go @@ -62,7 +62,6 @@ func (err ErrNoTypeForExplicitBindingFound) Error() string { return fmt.Sprintf("No type for explicit binding found. Given the explicit interface binding %s, a provider of type %s was not found.", err.Interface, err.Implementation) } - } func duplicateDefinitionError(typ reflect.Type, duplicateLoc Location, existingLoc string) error { diff --git a/simapp/app.go b/simapp/app.go index c0512b9e95..fe7ed8ec60 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -201,7 +201,6 @@ func NewSimApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *SimApp { - var ( appBuilder *runtime.AppBuilder app = &SimApp{invCheckPeriod: invCheckPeriod} diff --git a/x/auth/tx/module/module.go b/x/auth/tx/module/module.go index 5703746e3f..1128b2afa8 100644 --- a/x/auth/tx/module/module.go +++ b/x/auth/tx/module/module.go @@ -46,7 +46,6 @@ func provideModule(in txInputs) txOutputs { txConfig := tx.NewTxConfig(in.ProtoCodecMarshaler, tx.DefaultSignModes) baseAppOption := func(app *baseapp.BaseApp) { - // AnteHandlers if !in.Config.SkipAnteHandler { anteHandler, err := newAnteHandler(txConfig, in) diff --git a/x/auth/tx/service_test.go b/x/auth/tx/service_test.go index 39170c2e1c..fa0b59152d 100644 --- a/x/auth/tx/service_test.go +++ b/x/auth/tx/service_test.go @@ -242,8 +242,8 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPC() { "with pagination", &tx.GetTxsEventRequest{ Events: []string{bankMsgSendEventAction}, - Page: 2, - Limit: 2, + Page: 2, + Limit: 2, }, false, "", 1, }, diff --git a/x/authz/keeper/grpc_query.go b/x/authz/keeper/grpc_query.go index 3273ee2825..cfca0be70f 100644 --- a/x/authz/keeper/grpc_query.go +++ b/x/authz/keeper/grpc_query.go @@ -121,11 +121,9 @@ func (k Keeper) GranterGrants(c context.Context, req *authz.QueryGranterGrantsRe Authorization: any, Expiration: auth.Expiration, }, nil - }, func() *authz.Grant { return &authz.Grant{} }) - if err != nil { return nil, err } diff --git a/x/bank/simulation/genesis.go b/x/bank/simulation/genesis.go index 56d375cc62..8592b08a31 100644 --- a/x/bank/simulation/genesis.go +++ b/x/bank/simulation/genesis.go @@ -71,7 +71,6 @@ func RandomGenesisBalances(simState *module.SimulationState) []types.Balance { // RandomizedGenState generates a random GenesisState for bank func RandomizedGenState(simState *module.SimulationState) { - var defaultSendEnabledParam bool simState.AppParams.GetOrGenerate( simState.Cdc, string(types.KeyDefaultSendEnabled), &defaultSendEnabledParam, simState.Rand, diff --git a/x/bank/types/params.go b/x/bank/types/params.go index a9c4e25d14..531daa8b28 100644 --- a/x/bank/types/params.go +++ b/x/bank/types/params.go @@ -10,10 +10,8 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) -var ( - // DefaultDefaultSendEnabled is the value that DefaultSendEnabled will have from DefaultParams(). - DefaultDefaultSendEnabled = true -) +// DefaultDefaultSendEnabled is the value that DefaultSendEnabled will have from DefaultParams(). +var DefaultDefaultSendEnabled = true var ( // KeySendEnabled is store's key for SendEnabled Params diff --git a/x/distribution/abci_test.go b/x/distribution/abci_test.go index c1bd8e5a00..aafbc141f6 100644 --- a/x/distribution/abci_test.go +++ b/x/distribution/abci_test.go @@ -37,7 +37,6 @@ type validator struct { // Context in https://github.com/cosmos/cosmos-sdk/issues/9161 func TestVerifyProposerRewardAssignement(t *testing.T) { - var ( bankKeeper bankkeeper.Keeper stakingKeeper *stakingkeeper.Keeper diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index 3a2ddbc7e8..a5a4e86df3 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -46,7 +46,6 @@ type TestSuite struct { } func (s *TestSuite) SetupTest() { - app, err := simtestutil.Setup( grouptestutil.AppConfig, &s.interfaceRegistry, diff --git a/x/group/module/abci_test.go b/x/group/module/abci_test.go index 23ad44d0b4..bb9bdf22bd 100644 --- a/x/group/module/abci_test.go +++ b/x/group/module/abci_test.go @@ -39,7 +39,6 @@ func TestIntegrationTestSuite(t *testing.T) { } func (s *IntegrationTestSuite) SetupTest() { - app, err := simtestutil.Setup( grouptestutil.AppConfig, &s.interfaceRegistry, diff --git a/x/nft/keeper/nft_batch_test.go b/x/nft/keeper/nft_batch_test.go index d9561106e5..69529a86c7 100644 --- a/x/nft/keeper/nft_batch_test.go +++ b/x/nft/keeper/nft_batch_test.go @@ -73,7 +73,7 @@ func (s *TestSuite) TestBatchMint() { { "faild with not exist class", func(tokens []nft.NFT) { - //do nothing + // do nothing }, []nft.NFT{ {ClassId: "classID1", Id: "nftID1"}, @@ -197,7 +197,6 @@ func (s *TestSuite) TestBatchBurn() { s.Require().Error(err) }) } - } func (s *TestSuite) TestBatchUpdate() { @@ -266,7 +265,6 @@ func (s *TestSuite) TestBatchUpdate() { s.Require().Error(err) }) } - } func (s *TestSuite) TestBatchTransfer() { @@ -333,7 +331,6 @@ func (s *TestSuite) TestBatchTransfer() { s.Require().Error(err) }) } - } func groupByClassID(tokens []nft.NFT) map[string][]nft.NFT { diff --git a/x/nft/simulation/operations.go b/x/nft/simulation/operations.go index e85410066e..b7f9b58480 100644 --- a/x/nft/simulation/operations.go +++ b/x/nft/simulation/operations.go @@ -106,7 +106,6 @@ func SimulateMsgSend( []uint64{senderAcc.GetSequence()}, sender.PrivKey, ) - if err != nil { return simtypes.NoOpMsg(nft.ModuleName, TypeMsgSend, "unable to generate mock tx"), nil, err }