From 821d67a20b6d63c1a68c0df7e8fe338a833848c6 Mon Sep 17 00:00:00 2001 From: Draco Date: Tue, 21 Nov 2023 14:08:07 -0500 Subject: [PATCH] formatting fixes (#1783) --- app/export.go | 2 +- app/test_builder.go | 6 +++--- migrate/doc.go | 1 - x/evmutil/client/cli/address.go | 2 +- x/issuance/types/params.go | 2 +- x/kavadist/handler.go | 2 +- x/kavadist/keeper/proposal_handler.go | 2 +- x/kavadist/keeper/querier.go | 2 +- x/liquid/types/msg_test.go | 2 +- x/router/client/cli/tx.go | 2 +- x/router/keeper/msg_server.go | 2 +- x/router/types/msg.go | 2 +- x/swap/keeper/hooks_test.go | 2 +- x/swap/types/mocks/swap_hooks.go | 2 +- 14 files changed, 15 insertions(+), 16 deletions(-) diff --git a/app/export.go b/app/export.go index df4228e7..6c72866f 100644 --- a/app/export.go +++ b/app/export.go @@ -42,7 +42,7 @@ func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList [] // prepare for fresh start at zero height // NOTE zero height genesis is a temporary feature which will be deprecated -// in favour of export at a block height +// in favour of export at a block height func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []string) { applyWhiteList := false diff --git a/app/test_builder.go b/app/test_builder.go index b2c01f6c..60b9d958 100644 --- a/app/test_builder.go +++ b/app/test_builder.go @@ -13,10 +13,10 @@ import ( // All methods return the builder so method calls can be chained together. // // Example: -// // create a single account genesis state -// builder := NewAuthBankGenesisBuilder().WithSimpleAccount(testUserAddress, testCoins) -// genesisState := builder.BuildMarshalled() // +// // create a single account genesis state +// builder := NewAuthBankGenesisBuilder().WithSimpleAccount(testUserAddress, testCoins) +// genesisState := builder.BuildMarshalled() type AuthBankGenesisBuilder struct { AuthGenesis authtypes.GenesisState BankGenesis banktypes.GenesisState diff --git a/migrate/doc.go b/migrate/doc.go index 4576a263..ca17d49e 100644 --- a/migrate/doc.go +++ b/migrate/doc.go @@ -24,6 +24,5 @@ The process is: On each release we can delete the previous releases migration and old GenesisState type. eg kava-3 migrates `auth.GenesisState` from kava-2 to `auth.GenesisState` from kava-3, but for kava-4 we don't need to keep around kava-2's `auth.GenesisState` type. - */ package migrate diff --git a/x/evmutil/client/cli/address.go b/x/evmutil/client/cli/address.go index d9fca5e1..f748c63f 100644 --- a/x/evmutil/client/cli/address.go +++ b/x/evmutil/client/cli/address.go @@ -11,7 +11,7 @@ import ( ) // ParseAddrFromHexOrBech32 parses a string address that can be either a hex or -//Bech32 string. +// Bech32 string. func ParseAddrFromHexOrBech32(addrString string) (common.Address, error) { if common.IsHexAddress(addrString) { return common.HexToAddress(addrString), nil diff --git a/x/issuance/types/params.go b/x/issuance/types/params.go index 3a9de1be..d18fae9d 100644 --- a/x/issuance/types/params.go +++ b/x/issuance/types/params.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - sdk "github.com/cosmos/cosmos-sdk/types" sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) diff --git a/x/kavadist/handler.go b/x/kavadist/handler.go index dfd64bde..decad8ea 100644 --- a/x/kavadist/handler.go +++ b/x/kavadist/handler.go @@ -1,9 +1,9 @@ package kavadist import ( + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -errorsmod "cosmossdk.io/errors" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/kava-labs/kava/x/kavadist/keeper" diff --git a/x/kavadist/keeper/proposal_handler.go b/x/kavadist/keeper/proposal_handler.go index 086bed78..3f51d539 100644 --- a/x/kavadist/keeper/proposal_handler.go +++ b/x/kavadist/keeper/proposal_handler.go @@ -1,9 +1,9 @@ package keeper import ( + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -errorsmod "cosmossdk.io/errors" "github.com/kava-labs/kava/x/kavadist/types" ) diff --git a/x/kavadist/keeper/querier.go b/x/kavadist/keeper/querier.go index d23081db..d60cb252 100644 --- a/x/kavadist/keeper/querier.go +++ b/x/kavadist/keeper/querier.go @@ -1,10 +1,10 @@ package keeper import ( + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -errorsmod "cosmossdk.io/errors" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/liquid/types/msg_test.go b/x/liquid/types/msg_test.go index e5317e88..48b92e61 100644 --- a/x/liquid/types/msg_test.go +++ b/x/liquid/types/msg_test.go @@ -4,11 +4,11 @@ import ( fmt "fmt" "testing" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - sdkmath "cosmossdk.io/math" "github.com/kava-labs/kava/x/liquid/types" ) diff --git a/x/router/client/cli/tx.go b/x/router/client/cli/tx.go index 3c3abf89..894378fe 100644 --- a/x/router/client/cli/tx.go +++ b/x/router/client/cli/tx.go @@ -5,12 +5,12 @@ import ( "github.com/spf13/cobra" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/version" "github.com/kava-labs/kava/x/router/types" diff --git a/x/router/keeper/msg_server.go b/x/router/keeper/msg_server.go index 2b1fa634..ba18c6d0 100644 --- a/x/router/keeper/msg_server.go +++ b/x/router/keeper/msg_server.go @@ -4,9 +4,9 @@ import ( "context" "time" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -errorsmod "cosmossdk.io/errors" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" earntypes "github.com/kava-labs/kava/x/earn/types" diff --git a/x/router/types/msg.go b/x/router/types/msg.go index e7e1247f..93170853 100644 --- a/x/router/types/msg.go +++ b/x/router/types/msg.go @@ -1,9 +1,9 @@ package types import ( + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) diff --git a/x/swap/keeper/hooks_test.go b/x/swap/keeper/hooks_test.go index 6060a343..893aa658 100644 --- a/x/swap/keeper/hooks_test.go +++ b/x/swap/keeper/hooks_test.go @@ -4,8 +4,8 @@ import ( "github.com/kava-labs/kava/x/swap/types" "github.com/kava-labs/kava/x/swap/types/mocks" - sdk "github.com/cosmos/cosmos-sdk/types" sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/mock" ) diff --git a/x/swap/types/mocks/swap_hooks.go b/x/swap/types/mocks/swap_hooks.go index 0be1a20c..674f17cb 100644 --- a/x/swap/types/mocks/swap_hooks.go +++ b/x/swap/types/mocks/swap_hooks.go @@ -3,8 +3,8 @@ package mocks import ( - mock "github.com/stretchr/testify/mock" math "cosmossdk.io/math" + mock "github.com/stretchr/testify/mock" types "github.com/cosmos/cosmos-sdk/types" )