Skip to content

Commit

Permalink
refactor: use slices std (#19598)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Feb 29, 2024
1 parent 975ddc1 commit 1c9361c
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion client/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion runtime/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion store/storage/rocksdb/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions store/storage/sqlite/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import (
"bytes"
"database/sql"
"fmt"
"slices"
"strings"

"golang.org/x/exp/slices"

corestore "cosmossdk.io/core/store"
)

Expand Down
2 changes: 1 addition & 1 deletion store/upgrade.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion x/accounts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion x/accounts/v1/schema.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package v1

import (
"slices"
"strings"

"golang.org/x/exp/slices"
"google.golang.org/grpc"

"cosmossdk.io/x/accounts/internal/implementation"
Expand Down
2 changes: 1 addition & 1 deletion x/gov/depinject.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions x/slashing/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions x/slashing/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 1c9361c

Please sign in to comment.