From 1bd4351241783827d554d41edb3bbb383d587a97 Mon Sep 17 00:00:00 2001 From: ipangpang <167595720+ipangpang@users.noreply.github.com> Date: Mon, 22 Apr 2024 03:03:43 +0800 Subject: [PATCH 1/3] style: remove redundant import alias (#20109) Signed-off-by: ipangpang --- client/debug/main.go | 2 +- client/grpc/node/service.go | 2 +- client/input/input.go | 2 +- codec/amino.go | 2 +- collections/collections.go | 2 +- core/appmodule/genesis.go | 2 +- crypto/keys/multisig/amino.go | 2 +- crypto/keys/multisig/multisig.go | 2 +- crypto/keys/secp256k1/secp256k1_nocgo.go | 2 +- crypto/keys/secp256r1/pubkey.go | 2 +- crypto/keys/secp256r1/pubkey_internal_test.go | 2 +- crypto/types/types.go | 2 +- depinject/appconfig/config.go | 2 +- fuzz/tests/crypto_hd_deriveprivatekeyforpath_test.go | 2 +- fuzz/tests/tendermint_amino_decodetime_test.go | 2 +- orm/encoding/ormfield/bool.go | 2 +- orm/encoding/ormfield/duration.go | 2 +- orm/encoding/ormfield/enum.go | 2 +- orm/encoding/ormfield/int32.go | 2 +- orm/encoding/ormfield/int64.go | 2 +- orm/encoding/ormkv/unique_key_test.go | 2 +- server/cmt_cmds.go | 2 +- store/commitment/iavl/tree.go | 2 +- store/snapshots/types/convert.go | 2 +- tests/integration/staking/keeper/vote_extensions_test.go | 2 +- testutil/mock/types_handler.go | 6 +++--- testutil/testdata/codec.go | 4 ++-- testutil/testdata/grpc_query.go | 2 +- tools/hubl/internal/compat.go | 2 +- types/events.go | 2 +- types/events_test.go | 2 +- types/mempool/sender_nonce_property_test.go | 2 +- types/query/filtered_pagination.go | 2 +- types/tx/msgs.go | 2 +- types/tx_msg.go | 4 ++-- version/version_test.go | 2 +- x/accounts/defaults/lockup/types/encoding.go | 4 ++-- x/auth/tx/gogotx.go | 2 +- x/auth/types/account_retriever.go | 2 +- x/auth/types/genesis.go | 2 +- x/auth/types/genesis_test.go | 2 +- x/auth/vesting/types/expected_keepers.go | 2 +- x/authz/authorization_grant.go | 2 +- x/authz/authorizations.go | 2 +- x/authz/expected_keepers.go | 2 +- x/authz/genesis.go | 2 +- x/authz/proto_desc.go | 2 +- x/bank/testutil/helpers.go | 2 +- x/bank/types/expected_keepers.go | 2 +- x/bank/types/send_authorization.go | 2 +- x/circuit/keeper/genesis.go | 2 +- x/circuit/keeper/keeper.go | 2 +- x/circuit/keeper/keeper_test.go | 2 +- x/circuit/keeper/msg_server.go | 4 ++-- x/crisis/types/expected_keepers.go | 2 +- x/distribution/keeper/msg_server.go | 2 +- x/distribution/types/expected_keepers.go | 2 +- x/epochs/types/hooks_test.go | 2 +- x/evidence/keeper/grpc_query.go | 2 +- x/evidence/types/genesis.go | 2 +- x/evidence/types/querier.go | 2 +- x/feegrant/basic_fee.go | 2 +- x/genutil/client/cli/genaccount.go | 2 +- x/gov/testutil/expected_keepers.go | 2 +- x/gov/types/v1beta1/content.go | 2 +- x/gov/types/v1beta1/proposal.go | 2 +- x/group/expected_keepers.go | 2 +- x/group/testutil/expected_keepers.go | 2 +- x/group/types.go | 2 +- x/mint/types/expected_keepers.go | 2 +- x/mint/types/genesis.go | 2 +- x/nft/expected_keepers.go | 2 +- x/protocolpool/types/expected_keepers.go | 2 +- x/slashing/types/expected_keepers.go | 2 +- x/staking/keeper/slash.go | 2 +- x/staking/types/expected_keepers.go | 2 +- x/staking/types/hooks.go | 2 +- x/upgrade/types/handler.go | 2 +- 78 files changed, 84 insertions(+), 84 deletions(-) diff --git a/client/debug/main.go b/client/debug/main.go index 5d10e45cf184..8ee81eed3a05 100644 --- a/client/debug/main.go +++ b/client/debug/main.go @@ -17,7 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - legacybech32 "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" //nolint:staticcheck // we do old keys, they're keys after all. + "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" //nolint:staticcheck // we do old keys, they're keys after all. "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/version" ) diff --git a/client/grpc/node/service.go b/client/grpc/node/service.go index 29094382ff66..5c9bb960025e 100644 --- a/client/grpc/node/service.go +++ b/client/grpc/node/service.go @@ -1,7 +1,7 @@ package node import ( - context "context" + "context" gogogrpc "github.com/cosmos/gogoproto/grpc" "github.com/grpc-ecosystem/grpc-gateway/runtime" diff --git a/client/input/input.go b/client/input/input.go index 58b2d206dfbd..218be0b996f3 100644 --- a/client/input/input.go +++ b/client/input/input.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/bgentry/speakeasy" - isatty "github.com/mattn/go-isatty" + "github.com/mattn/go-isatty" ) // MinPassLength is the minimum acceptable password length diff --git a/codec/amino.go b/codec/amino.go index f17dbcc4a43f..6d4b70bb5736 100644 --- a/codec/amino.go +++ b/codec/amino.go @@ -8,7 +8,7 @@ import ( "io" cmttypes "github.com/cometbft/cometbft/types" - amino "github.com/tendermint/go-amino" + "github.com/tendermint/go-amino" "github.com/cosmos/cosmos-sdk/codec/types" ) diff --git a/collections/collections.go b/collections/collections.go index 6a7b2a093423..9de3bbc38226 100644 --- a/collections/collections.go +++ b/collections/collections.go @@ -3,7 +3,7 @@ package collections import ( "context" "errors" - io "io" + "io" "math" "cosmossdk.io/collections/codec" diff --git a/core/appmodule/genesis.go b/core/appmodule/genesis.go index dcc7fe8a992a..5bf1b80357aa 100644 --- a/core/appmodule/genesis.go +++ b/core/appmodule/genesis.go @@ -4,7 +4,7 @@ import ( "context" "io" - appmodule "cosmossdk.io/core/appmodule/v2" + "cosmossdk.io/core/appmodule/v2" ) // HasGenesis defines a custom genesis handling API implementation. diff --git a/crypto/keys/multisig/amino.go b/crypto/keys/multisig/amino.go index 8fa596906d89..6ac90d0bdd11 100644 --- a/crypto/keys/multisig/amino.go +++ b/crypto/keys/multisig/amino.go @@ -3,7 +3,7 @@ package multisig import ( errorsmod "cosmossdk.io/errors" - types "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) diff --git a/crypto/keys/multisig/multisig.go b/crypto/keys/multisig/multisig.go index 10f7d2e04000..7ea52f751828 100644 --- a/crypto/keys/multisig/multisig.go +++ b/crypto/keys/multisig/multisig.go @@ -1,7 +1,7 @@ package multisig import ( - fmt "fmt" + "fmt" cmtcrypto "github.com/cometbft/cometbft/crypto" diff --git a/crypto/keys/secp256k1/secp256k1_nocgo.go b/crypto/keys/secp256k1/secp256k1_nocgo.go index bad10212b63c..eb47ab11e786 100644 --- a/crypto/keys/secp256k1/secp256k1_nocgo.go +++ b/crypto/keys/secp256k1/secp256k1_nocgo.go @@ -7,7 +7,7 @@ import ( "errors" "github.com/cometbft/cometbft/crypto" - secp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v4" + "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa" ) diff --git a/crypto/keys/secp256r1/pubkey.go b/crypto/keys/secp256r1/pubkey.go index fea06f73f201..96c673a04068 100644 --- a/crypto/keys/secp256r1/pubkey.go +++ b/crypto/keys/secp256r1/pubkey.go @@ -6,7 +6,7 @@ import ( cmtcrypto "github.com/cometbft/cometbft/crypto" "github.com/cosmos/gogoproto/proto" - ecdsa "github.com/cosmos/cosmos-sdk/crypto/keys/internal/ecdsa" + "github.com/cosmos/cosmos-sdk/crypto/keys/internal/ecdsa" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) diff --git a/crypto/keys/secp256r1/pubkey_internal_test.go b/crypto/keys/secp256r1/pubkey_internal_test.go index 77f4a66e5114..b9bba80a2adf 100644 --- a/crypto/keys/secp256r1/pubkey_internal_test.go +++ b/crypto/keys/secp256r1/pubkey_internal_test.go @@ -3,7 +3,7 @@ package secp256r1 import ( "testing" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/codec" diff --git a/crypto/types/types.go b/crypto/types/types.go index 12fc6e39541f..7f01b6078cf3 100644 --- a/crypto/types/types.go +++ b/crypto/types/types.go @@ -2,7 +2,7 @@ package types import ( cmtcrypto "github.com/cometbft/cometbft/crypto" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" ) // PubKey defines a public key and extends proto.Message. diff --git a/depinject/appconfig/config.go b/depinject/appconfig/config.go index 4bc44f6ace0b..83160ad3790b 100644 --- a/depinject/appconfig/config.go +++ b/depinject/appconfig/config.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-proto/anyutil" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/known/anypb" "sigs.k8s.io/yaml" diff --git a/fuzz/tests/crypto_hd_deriveprivatekeyforpath_test.go b/fuzz/tests/crypto_hd_deriveprivatekeyforpath_test.go index be40b785848b..d10d9dcc6bda 100644 --- a/fuzz/tests/crypto_hd_deriveprivatekeyforpath_test.go +++ b/fuzz/tests/crypto_hd_deriveprivatekeyforpath_test.go @@ -6,7 +6,7 @@ import ( "bytes" "testing" - bip39 "github.com/cosmos/go-bip39" + "github.com/cosmos/go-bip39" "github.com/cosmos/cosmos-sdk/crypto/hd" ) diff --git a/fuzz/tests/tendermint_amino_decodetime_test.go b/fuzz/tests/tendermint_amino_decodetime_test.go index 8720c31a1024..bed6bd5662d0 100644 --- a/fuzz/tests/tendermint_amino_decodetime_test.go +++ b/fuzz/tests/tendermint_amino_decodetime_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - amino "github.com/tendermint/go-amino" + "github.com/tendermint/go-amino" ) func FuzzTendermintAminoDecodeTime(f *testing.F) { diff --git a/orm/encoding/ormfield/bool.go b/orm/encoding/ormfield/bool.go index 454963b607ae..4c7b527d4b71 100644 --- a/orm/encoding/ormfield/bool.go +++ b/orm/encoding/ormfield/bool.go @@ -1,7 +1,7 @@ package ormfield import ( - io "io" + "io" "google.golang.org/protobuf/reflect/protoreflect" ) diff --git a/orm/encoding/ormfield/duration.go b/orm/encoding/ormfield/duration.go index 078d0ca61477..1cca738da5f0 100644 --- a/orm/encoding/ormfield/duration.go +++ b/orm/encoding/ormfield/duration.go @@ -2,7 +2,7 @@ package ormfield import ( "fmt" - io "io" + "io" "google.golang.org/protobuf/reflect/protoreflect" ) diff --git a/orm/encoding/ormfield/enum.go b/orm/encoding/ormfield/enum.go index 03b95a3821bf..c0fb524ec133 100644 --- a/orm/encoding/ormfield/enum.go +++ b/orm/encoding/ormfield/enum.go @@ -2,7 +2,7 @@ package ormfield import ( "encoding/binary" - io "io" + "io" "google.golang.org/protobuf/reflect/protoreflect" ) diff --git a/orm/encoding/ormfield/int32.go b/orm/encoding/ormfield/int32.go index 8b2dd9331af8..87944371f607 100644 --- a/orm/encoding/ormfield/int32.go +++ b/orm/encoding/ormfield/int32.go @@ -2,7 +2,7 @@ package ormfield import ( "encoding/binary" - io "io" + "io" "google.golang.org/protobuf/reflect/protoreflect" ) diff --git a/orm/encoding/ormfield/int64.go b/orm/encoding/ormfield/int64.go index 1a1230ef206e..0389844b9bf0 100644 --- a/orm/encoding/ormfield/int64.go +++ b/orm/encoding/ormfield/int64.go @@ -2,7 +2,7 @@ package ormfield import ( "encoding/binary" - io "io" + "io" "google.golang.org/protobuf/reflect/protoreflect" ) diff --git a/orm/encoding/ormkv/unique_key_test.go b/orm/encoding/ormkv/unique_key_test.go index f7448d409d58..cddddcd0b02a 100644 --- a/orm/encoding/ormkv/unique_key_test.go +++ b/orm/encoding/ormkv/unique_key_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" "gotest.tools/v3/assert" "pgregory.net/rapid" diff --git a/server/cmt_cmds.go b/server/cmt_cmds.go index 5416e5ee964d..c085e9c887c8 100644 --- a/server/cmt_cmds.go +++ b/server/cmt_cmds.go @@ -22,7 +22,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" - rpc "github.com/cosmos/cosmos-sdk/client/rpc" + "github.com/cosmos/cosmos-sdk/client/rpc" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/store/commitment/iavl/tree.go b/store/commitment/iavl/tree.go index 944b7408593e..f2f73922306d 100644 --- a/store/commitment/iavl/tree.go +++ b/store/commitment/iavl/tree.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/iavl" ics23 "github.com/cosmos/ics23/go" - log "cosmossdk.io/log" + "cosmossdk.io/log" "cosmossdk.io/store/v2" "cosmossdk.io/store/v2/commitment" dbm "cosmossdk.io/store/v2/db" diff --git a/store/snapshots/types/convert.go b/store/snapshots/types/convert.go index 90deead3bfa8..e37aca56ab6c 100644 --- a/store/snapshots/types/convert.go +++ b/store/snapshots/types/convert.go @@ -2,7 +2,7 @@ package types import ( abci "github.com/cometbft/cometbft/abci/types" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" "cosmossdk.io/errors" ) diff --git a/tests/integration/staking/keeper/vote_extensions_test.go b/tests/integration/staking/keeper/vote_extensions_test.go index 506b5b991018..08f5c25bcf17 100644 --- a/tests/integration/staking/keeper/vote_extensions_test.go +++ b/tests/integration/staking/keeper/vote_extensions_test.go @@ -18,7 +18,7 @@ import ( stakingtypes "cosmossdk.io/x/staking/types" "github.com/cosmos/cosmos-sdk/baseapp" - ed25519 "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/testutil/mock/types_handler.go b/testutil/mock/types_handler.go index c3a59d0362b2..dfdb46cf3d79 100644 --- a/testutil/mock/types_handler.go +++ b/testutil/mock/types_handler.go @@ -8,11 +8,11 @@ package mock import ( - reflect "reflect" + "reflect" - gomock "github.com/golang/mock/gomock" + "github.com/golang/mock/gomock" - types "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types" ) // MockAnteDecorator is a mock of AnteDecorator interface. diff --git a/testutil/testdata/codec.go b/testutil/testdata/codec.go index ffecb3444435..2e2ca6e80aa9 100644 --- a/testutil/testdata/codec.go +++ b/testutil/testdata/codec.go @@ -1,12 +1,12 @@ package testdata import ( - amino "github.com/tendermint/go-amino" + "github.com/tendermint/go-amino" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - tx "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/types/tx" ) func NewTestInterfaceRegistry() types.InterfaceRegistry { diff --git a/testutil/testdata/grpc_query.go b/testutil/testdata/grpc_query.go index 4aec7622a929..1e5ae1830de9 100644 --- a/testutil/testdata/grpc_query.go +++ b/testutil/testdata/grpc_query.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" + "google.golang.org/grpc" "gotest.tools/v3/assert" "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/tools/hubl/internal/compat.go b/tools/hubl/internal/compat.go index 463bb4889fcf..856dd9b8005c 100644 --- a/tools/hubl/internal/compat.go +++ b/tools/hubl/internal/compat.go @@ -9,7 +9,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" "google.golang.org/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/descriptorpb" diff --git a/types/events.go b/types/events.go index 335fac3182c8..f883fe778347 100644 --- a/types/events.go +++ b/types/events.go @@ -9,7 +9,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/gogoproto/jsonpb" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" "golang.org/x/exp/maps" "github.com/cosmos/cosmos-sdk/codec" diff --git a/types/events_test.go b/types/events_test.go index a5280f0a1730..74e16466dc43 100644 --- a/types/events_test.go +++ b/types/events_test.go @@ -11,7 +11,7 @@ import ( "cosmossdk.io/math" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - testdata "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/types/mempool/sender_nonce_property_test.go b/types/mempool/sender_nonce_property_test.go index 0d5e10851e34..5ebda7d6f93d 100644 --- a/types/mempool/sender_nonce_property_test.go +++ b/types/mempool/sender_nonce_property_test.go @@ -11,7 +11,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - mempool "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/cosmos/cosmos-sdk/types/mempool" ) var ( diff --git a/types/query/filtered_pagination.go b/types/query/filtered_pagination.go index af2d2dd176e4..7d57aa8f534f 100644 --- a/types/query/filtered_pagination.go +++ b/types/query/filtered_pagination.go @@ -3,7 +3,7 @@ package query import ( "fmt" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" "cosmossdk.io/store/types" diff --git a/types/tx/msgs.go b/types/tx/msgs.go index a27aebb2056e..2f2f9a80f912 100644 --- a/types/tx/msgs.go +++ b/types/tx/msgs.go @@ -1,7 +1,7 @@ package tx import ( - fmt "fmt" + "fmt" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/types/tx_msg.go b/types/tx_msg.go index 1f81dbbc0912..2425091c9c89 100644 --- a/types/tx_msg.go +++ b/types/tx_msg.go @@ -2,8 +2,8 @@ package types import ( "encoding/json" - fmt "fmt" - strings "strings" + "fmt" + "strings" "github.com/cosmos/gogoproto/proto" protov2 "google.golang.org/protobuf/proto" diff --git a/version/version_test.go b/version/version_test.go index 75e52d8076cd..48b4428bda0d 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -1,7 +1,7 @@ package version_test import ( - context "context" + "context" "encoding/json" "fmt" "runtime" diff --git a/x/accounts/defaults/lockup/types/encoding.go b/x/accounts/defaults/lockup/types/encoding.go index ec41739a09c6..c32dba4b5f60 100644 --- a/x/accounts/defaults/lockup/types/encoding.go +++ b/x/accounts/defaults/lockup/types/encoding.go @@ -1,11 +1,11 @@ package types import ( - fmt "fmt" + "fmt" "reflect" "strings" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" codectypes "github.com/cosmos/cosmos-sdk/codec/types" ) diff --git a/x/auth/tx/gogotx.go b/x/auth/tx/gogotx.go index dfd9e8559d53..a0896589176a 100644 --- a/x/auth/tx/gogotx.go +++ b/x/auth/tx/gogotx.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/gogoproto/proto" protov2 "google.golang.org/protobuf/proto" - anypb "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/anypb" "cosmossdk.io/core/address" errorsmod "cosmossdk.io/errors" diff --git a/x/auth/types/account_retriever.go b/x/auth/types/account_retriever.go index 420b26bf31da..020252aa939e 100644 --- a/x/auth/types/account_retriever.go +++ b/x/auth/types/account_retriever.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - grpc "google.golang.org/grpc" + "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" diff --git a/x/auth/types/genesis.go b/x/auth/types/genesis.go index 82a45779c3cb..b31c686bc43f 100644 --- a/x/auth/types/genesis.go +++ b/x/auth/types/genesis.go @@ -6,7 +6,7 @@ import ( "fmt" "sort" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/auth/types/genesis_test.go b/x/auth/types/genesis_test.go index c8be155e8ffa..b4aa361cfb8f 100644 --- a/x/auth/types/genesis_test.go +++ b/x/auth/types/genesis_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" "cosmossdk.io/x/auth" diff --git a/x/auth/vesting/types/expected_keepers.go b/x/auth/vesting/types/expected_keepers.go index d52848119f5e..59118b466a69 100644 --- a/x/auth/vesting/types/expected_keepers.go +++ b/x/auth/vesting/types/expected_keepers.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" "cosmossdk.io/x/auth/types" diff --git a/x/authz/authorization_grant.go b/x/authz/authorization_grant.go index cb2088316fc0..9dd8aced3791 100644 --- a/x/authz/authorization_grant.go +++ b/x/authz/authorization_grant.go @@ -3,7 +3,7 @@ package authz import ( "time" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" errorsmod "cosmossdk.io/errors" diff --git a/x/authz/authorizations.go b/x/authz/authorizations.go index 3e15963ed6ad..a1a62ba06055 100644 --- a/x/authz/authorizations.go +++ b/x/authz/authorizations.go @@ -1,7 +1,7 @@ package authz import ( - context "context" + "context" "github.com/cosmos/gogoproto/proto" diff --git a/x/authz/expected_keepers.go b/x/authz/expected_keepers.go index 7886eba63a78..fad3b4b74467 100644 --- a/x/authz/expected_keepers.go +++ b/x/authz/expected_keepers.go @@ -1,7 +1,7 @@ package authz import ( - context "context" + "context" "cosmossdk.io/core/address" diff --git a/x/authz/genesis.go b/x/authz/genesis.go index 169684e0734f..2e7dde1b7260 100644 --- a/x/authz/genesis.go +++ b/x/authz/genesis.go @@ -1,7 +1,7 @@ package authz import ( - fmt "fmt" + "fmt" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" ) diff --git a/x/authz/proto_desc.go b/x/authz/proto_desc.go index cc5e62e7a3d6..db55b7d15d13 100644 --- a/x/authz/proto_desc.go +++ b/x/authz/proto_desc.go @@ -1,6 +1,6 @@ package authz -import grpc "google.golang.org/grpc" +import "google.golang.org/grpc" // MsgServiceDesc return ServiceDesc for Msg server func MsgServiceDesc() *grpc.ServiceDesc { diff --git a/x/bank/testutil/helpers.go b/x/bank/testutil/helpers.go index 7790848ffe61..8167097cc533 100644 --- a/x/bank/testutil/helpers.go +++ b/x/bank/testutil/helpers.go @@ -1,7 +1,7 @@ package testutil import ( - context "context" + "context" bankkeeper "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/bank/types" diff --git a/x/bank/types/expected_keepers.go b/x/bank/types/expected_keepers.go index 0cebc65d3952..d49bf4cc4b98 100644 --- a/x/bank/types/expected_keepers.go +++ b/x/bank/types/expected_keepers.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" "cosmossdk.io/core/address" "cosmossdk.io/x/auth/types" diff --git a/x/bank/types/send_authorization.go b/x/bank/types/send_authorization.go index 05c5299894e9..a2be16480ed7 100644 --- a/x/bank/types/send_authorization.go +++ b/x/bank/types/send_authorization.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" "cosmossdk.io/core/address" diff --git a/x/circuit/keeper/genesis.go b/x/circuit/keeper/genesis.go index 01407852da94..bd6de732cf7d 100644 --- a/x/circuit/keeper/genesis.go +++ b/x/circuit/keeper/genesis.go @@ -1,7 +1,7 @@ package keeper import ( - context "context" + "context" "cosmossdk.io/x/circuit/types" ) diff --git a/x/circuit/keeper/keeper.go b/x/circuit/keeper/keeper.go index 6902720170f6..1ddd2edd511f 100644 --- a/x/circuit/keeper/keeper.go +++ b/x/circuit/keeper/keeper.go @@ -1,7 +1,7 @@ package keeper import ( - context "context" + "context" "cosmossdk.io/collections" "cosmossdk.io/core/address" diff --git a/x/circuit/keeper/keeper_test.go b/x/circuit/keeper/keeper_test.go index 37a93547b63e..6c30502f9fda 100644 --- a/x/circuit/keeper/keeper_test.go +++ b/x/circuit/keeper/keeper_test.go @@ -2,7 +2,7 @@ package keeper_test import ( "bytes" - context "context" + "context" "testing" "github.com/stretchr/testify/require" diff --git a/x/circuit/keeper/msg_server.go b/x/circuit/keeper/msg_server.go index fbb46e35d167..3c7df7172732 100644 --- a/x/circuit/keeper/msg_server.go +++ b/x/circuit/keeper/msg_server.go @@ -2,8 +2,8 @@ package keeper import ( "bytes" - context "context" - fmt "fmt" + "context" + "fmt" "strings" "cosmossdk.io/collections" diff --git a/x/crisis/types/expected_keepers.go b/x/crisis/types/expected_keepers.go index 468b6f1ed5f1..5bd97754e074 100644 --- a/x/crisis/types/expected_keepers.go +++ b/x/crisis/types/expected_keepers.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/distribution/keeper/msg_server.go b/x/distribution/keeper/msg_server.go index c20995f57bb4..6f8b622f52b3 100644 --- a/x/distribution/keeper/msg_server.go +++ b/x/distribution/keeper/msg_server.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - metrics "github.com/hashicorp/go-metrics" + "github.com/hashicorp/go-metrics" "cosmossdk.io/errors" "cosmossdk.io/x/distribution/types" diff --git a/x/distribution/types/expected_keepers.go b/x/distribution/types/expected_keepers.go index 4c4b3248f50c..89fb84b75d62 100644 --- a/x/distribution/types/expected_keepers.go +++ b/x/distribution/types/expected_keepers.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" "cosmossdk.io/core/address" stakingtypes "cosmossdk.io/x/staking/types" diff --git a/x/epochs/types/hooks_test.go b/x/epochs/types/hooks_test.go index 51f00568f0d3..8134c55562bb 100644 --- a/x/epochs/types/hooks_test.go +++ b/x/epochs/types/hooks_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/suite" - errors "cosmossdk.io/errors" + "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/epochs/types" diff --git a/x/evidence/keeper/grpc_query.go b/x/evidence/keeper/grpc_query.go index 3ac40ca1b101..a665c820ce31 100644 --- a/x/evidence/keeper/grpc_query.go +++ b/x/evidence/keeper/grpc_query.go @@ -5,7 +5,7 @@ import ( "encoding/hex" "fmt" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/evidence/types/genesis.go b/x/evidence/types/genesis.go index 873f9a075fba..d9ccaefbe729 100644 --- a/x/evidence/types/genesis.go +++ b/x/evidence/types/genesis.go @@ -3,7 +3,7 @@ package types import ( "fmt" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" "cosmossdk.io/x/evidence/exported" diff --git a/x/evidence/types/querier.go b/x/evidence/types/querier.go index 87d9e25230b1..d3cdda63c92c 100644 --- a/x/evidence/types/querier.go +++ b/x/evidence/types/querier.go @@ -1,7 +1,7 @@ package types import ( - query "github.com/cosmos/cosmos-sdk/types/query" + "github.com/cosmos/cosmos-sdk/types/query" ) // Querier routes for the evidence module diff --git a/x/feegrant/basic_fee.go b/x/feegrant/basic_fee.go index ae9a375ce4f3..567f3523e895 100644 --- a/x/feegrant/basic_fee.go +++ b/x/feegrant/basic_fee.go @@ -2,7 +2,7 @@ package feegrant import ( "context" - time "time" + "time" errorsmod "cosmossdk.io/errors" diff --git a/x/genutil/client/cli/genaccount.go b/x/genutil/client/cli/genaccount.go index 94bb3ec6f0e9..1cbb42b42379 100644 --- a/x/genutil/client/cli/genaccount.go +++ b/x/genutil/client/cli/genaccount.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - address "cosmossdk.io/core/address" + "cosmossdk.io/core/address" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/gov/testutil/expected_keepers.go b/x/gov/testutil/expected_keepers.go index 9eb735dde5e5..b1b1a55c9add 100644 --- a/x/gov/testutil/expected_keepers.go +++ b/x/gov/testutil/expected_keepers.go @@ -3,7 +3,7 @@ package testutil import ( - context "context" + "context" "cosmossdk.io/math" bankkeeper "cosmossdk.io/x/bank/keeper" diff --git a/x/gov/types/v1beta1/content.go b/x/gov/types/v1beta1/content.go index 15120c829cd5..ae57a5dc00e3 100644 --- a/x/gov/types/v1beta1/content.go +++ b/x/gov/types/v1beta1/content.go @@ -1,6 +1,6 @@ package v1beta1 -import context "context" +import "context" // Content defines an interface that a proposal must implement. It contains // information such as the title and description along with the type and routing diff --git a/x/gov/types/v1beta1/proposal.go b/x/gov/types/v1beta1/proposal.go index fdc7821ee957..ddc48e169801 100644 --- a/x/gov/types/v1beta1/proposal.go +++ b/x/gov/types/v1beta1/proposal.go @@ -1,7 +1,7 @@ package v1beta1 import ( - context "context" + "context" "fmt" "strings" "time" diff --git a/x/group/expected_keepers.go b/x/group/expected_keepers.go index ba4db32a2e0d..9c336aa79b51 100644 --- a/x/group/expected_keepers.go +++ b/x/group/expected_keepers.go @@ -1,7 +1,7 @@ package group import ( - context "context" + "context" "cosmossdk.io/core/address" diff --git a/x/group/testutil/expected_keepers.go b/x/group/testutil/expected_keepers.go index 016e3a84fe84..2d832c13a672 100644 --- a/x/group/testutil/expected_keepers.go +++ b/x/group/testutil/expected_keepers.go @@ -3,7 +3,7 @@ package testutil import ( - context "context" + "context" bank "cosmossdk.io/x/bank/types" "cosmossdk.io/x/group" diff --git a/x/group/types.go b/x/group/types.go index f510b13aaeaf..4a8b2cd7d564 100644 --- a/x/group/types.go +++ b/x/group/types.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" "cosmossdk.io/core/address" errorsmod "cosmossdk.io/errors" diff --git a/x/mint/types/expected_keepers.go b/x/mint/types/expected_keepers.go index a184ff2cd118..9a94f3f2e867 100644 --- a/x/mint/types/expected_keepers.go +++ b/x/mint/types/expected_keepers.go @@ -1,7 +1,7 @@ package types // noalias import ( - context "context" + "context" "cosmossdk.io/core/address" "cosmossdk.io/math" diff --git a/x/mint/types/genesis.go b/x/mint/types/genesis.go index 696177ff5a4f..6ed2f38a18ec 100644 --- a/x/mint/types/genesis.go +++ b/x/mint/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" "cosmossdk.io/math" ) diff --git a/x/nft/expected_keepers.go b/x/nft/expected_keepers.go index 045032e86ab3..735d73b7d2da 100644 --- a/x/nft/expected_keepers.go +++ b/x/nft/expected_keepers.go @@ -1,7 +1,7 @@ package nft import ( - context "context" + "context" "cosmossdk.io/core/address" diff --git a/x/protocolpool/types/expected_keepers.go b/x/protocolpool/types/expected_keepers.go index 8f86343b1181..c83f921ee730 100644 --- a/x/protocolpool/types/expected_keepers.go +++ b/x/protocolpool/types/expected_keepers.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" "cosmossdk.io/core/address" diff --git a/x/slashing/types/expected_keepers.go b/x/slashing/types/expected_keepers.go index 37872aad0262..654cceb3825b 100644 --- a/x/slashing/types/expected_keepers.go +++ b/x/slashing/types/expected_keepers.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" st "cosmossdk.io/api/cosmos/staking/v1beta1" "cosmossdk.io/core/address" diff --git a/x/staking/keeper/slash.go b/x/staking/keeper/slash.go index 0f7f245e81ed..167c1da0a036 100644 --- a/x/staking/keeper/slash.go +++ b/x/staking/keeper/slash.go @@ -8,7 +8,7 @@ import ( st "cosmossdk.io/api/cosmos/staking/v1beta1" "cosmossdk.io/collections" "cosmossdk.io/math" - types "cosmossdk.io/x/staking/types" + "cosmossdk.io/x/staking/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/staking/types/expected_keepers.go b/x/staking/types/expected_keepers.go index 7b11f9e1ece6..e10132de836b 100644 --- a/x/staking/types/expected_keepers.go +++ b/x/staking/types/expected_keepers.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" diff --git a/x/staking/types/hooks.go b/x/staking/types/hooks.go index 9fad002b0170..6cf0581b6e53 100644 --- a/x/staking/types/hooks.go +++ b/x/staking/types/hooks.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" sdkmath "cosmossdk.io/math" diff --git a/x/upgrade/types/handler.go b/x/upgrade/types/handler.go index 80d57da469e2..3af3043053a8 100644 --- a/x/upgrade/types/handler.go +++ b/x/upgrade/types/handler.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" "github.com/cosmos/cosmos-sdk/types/module" ) From bd1701f4f267c71093022597aefd745e336523ca Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 22 Apr 2024 03:09:00 +0800 Subject: [PATCH 2/3] fix: use timestamp for sim log file name (#20108) --- x/simulation/log.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/simulation/log.go b/x/simulation/log.go index b1b067510c90..ff2edf1f205e 100644 --- a/x/simulation/log.go +++ b/x/simulation/log.go @@ -49,7 +49,7 @@ func (lw *StandardLogWriter) PrintLogs() { func createLogFile() *os.File { var f *os.File - fileName := fmt.Sprintf("%s.log", time.Now().Format("2006-01-02_15:04:05")) + fileName := fmt.Sprintf("%d.log", time.Now().UnixMilli()) folderPath := path.Join(os.ExpandEnv("$HOME"), ".simapp", "simulations") filePath := path.Join(folderPath, fileName) From f31a6a3024ba71b847b6934b912fca74bbdabbb4 Mon Sep 17 00:00:00 2001 From: Fyse <43966348+Fyse@users.noreply.github.com> Date: Sun, 21 Apr 2024 20:09:20 +0100 Subject: [PATCH 3/3] chores: removed typo, corrected grammatical error (#20110) --- README.md | 2 +- telemetry/wrapper.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 607f7d345848..91c7c0cbceb3 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ The version matrix below shows which versions of the Cosmos SDK, modules and lib #### Core Dependencies -Core Dependencies are the core libraries that a application may depend on. +Core Dependencies are the core libraries that an application may depend on. > Note: the ❌ signals that the version of the Cosmos SDK does not need to import the dependency. diff --git a/telemetry/wrapper.go b/telemetry/wrapper.go index da11f1fa0450..1e37cb8cc296 100644 --- a/telemetry/wrapper.go +++ b/telemetry/wrapper.go @@ -90,7 +90,7 @@ func SetGaugeWithLabels(keys []string, val float32, labels []metrics.Label) { metrics.SetGaugeWithLabels(keys, val, append(labels, globalLabels...)) } -// MeasureSince provides a wrapper functionality for emitting a a time measure +// MeasureSince provides a wrapper functionality for emitting a time measure // metric with global labels (if any). func MeasureSince(start time.Time, keys ...string) { if !IsTelemetryEnabled() {