refactor: use slices std (#19598)

This commit is contained in:
Julien Robert 2024-02-29 10:57:42 +01:00 committed by GitHub
parent 975ddc1d31
commit 1c9361ca4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 10 additions and 16 deletions

View File

@ -4,12 +4,12 @@ import (
"context"
"crypto/tls"
"fmt"
"slices"
"strings"
"github.com/cockroachdb/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"golang.org/x/exp/slices"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"

View File

@ -3,9 +3,9 @@ package runtime
import (
"encoding/json"
"fmt"
"slices"
abci "github.com/cometbft/cometbft/abci/types"
"golang.org/x/exp/slices"
runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1"
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"

View File

@ -9,7 +9,7 @@ import (
"fmt"
"github.com/linxGnu/grocksdb"
"golang.org/x/exp/slices"
"slices"
corestore "cosmossdk.io/core/store"
"cosmossdk.io/store/v2"

View File

@ -4,10 +4,9 @@ import (
"bytes"
"database/sql"
"fmt"
"slices"
"strings"
"golang.org/x/exp/slices"
corestore "cosmossdk.io/core/store"
)

View File

@ -1,6 +1,6 @@
package store
import "golang.org/x/exp/slices"
import "slices"
// StoreUpgrades defines a series of transformations to apply the RootStore upon
// loading a version.

View File

@ -4,13 +4,13 @@ import (
"encoding/json"
"fmt"
"reflect"
"slices"
"strings"
abci "github.com/cometbft/cometbft/abci/types"
"github.com/cosmos/gogoproto/jsonpb"
proto "github.com/cosmos/gogoproto/proto"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
"github.com/cosmos/cosmos-sdk/codec"
)

View File

@ -14,7 +14,6 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
google.golang.org/grpc v1.62.0
google.golang.org/protobuf v1.32.0
)
@ -145,6 +144,7 @@ require (
go.etcd.io/bbolt v1.3.7 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.20.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sync v0.6.0 // indirect

View File

@ -1,9 +1,9 @@
package v1
import (
"slices"
"strings"
"golang.org/x/exp/slices"
"google.golang.org/grpc"
"cosmossdk.io/x/accounts/internal/implementation"

View File

@ -2,11 +2,11 @@ package gov
import (
"fmt"
"slices"
"sort"
"strings"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
modulev1 "cosmossdk.io/api/cosmos/gov/module/v1"
"cosmossdk.io/core/appmodule"

View File

@ -12,8 +12,6 @@ require (
cosmossdk.io/math v1.3.0
cosmossdk.io/store v1.0.2
cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000
cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000
cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000
github.com/bits-and-blooms/bitset v1.10.0
github.com/cockroachdb/errors v1.11.1
@ -35,6 +33,7 @@ require (
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 // indirect
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect
cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/tx v0.13.0 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect

View File

@ -14,10 +14,6 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE=
cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k=
cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0=
cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs=
cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4 h1:IsfBQ8iJ/7d2MAKrDdK9ZlkwewoOdpm2klvdiOuDc0U=
cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4/go.mod h1:5BYCiCDWhTygqsXXWtokxupQbwxtyzMhtWKlhBM4sPI=
cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 h1:XQJj9Dv9Gtze0l2TF79BU5lkP6MkUveTUuKICmxoz+o=
cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190/go.mod h1:7WUGupOvmlHJoIMBz1JbObQxeo6/TDiuDBxmtod8HRg=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=