refactor: remove x/exp dep (#21281)
This commit is contained in:
@@ -3,11 +3,12 @@ package cmd
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"maps"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"cosmossdk.io/tools/confix"
|
||||
|
||||
@@ -43,7 +44,7 @@ func DiffCommand() *cobra.Command {
|
||||
|
||||
targetVersion := args[0]
|
||||
if _, ok := confix.Migrations[targetVersion]; !ok {
|
||||
return fmt.Errorf("unknown version %q, supported versions are: %q", targetVersion, maps.Keys(confix.Migrations))
|
||||
return fmt.Errorf("unknown version %q, supported versions are: %q", targetVersion, slices.Collect(maps.Keys(confix.Migrations)))
|
||||
}
|
||||
|
||||
targetVersionFile, err := confix.LoadLocalConfig(targetVersion, configType)
|
||||
|
||||
@@ -4,11 +4,12 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"maps"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"cosmossdk.io/tools/confix"
|
||||
|
||||
@@ -60,7 +61,7 @@ In case of any error in updating the file, no output is written.`,
|
||||
targetVersion := args[0]
|
||||
plan, ok := confix.Migrations[targetVersion]
|
||||
if !ok {
|
||||
return fmt.Errorf("unknown version %q, supported versions are: %q", targetVersion, maps.Keys(confix.Migrations))
|
||||
return fmt.Errorf("unknown version %q, supported versions are: %q", targetVersion, slices.Collect(maps.Keys(confix.Migrations)))
|
||||
}
|
||||
|
||||
rawFile, err := confix.LoadConfig(configPath)
|
||||
|
||||
+1
-1
@@ -9,7 +9,6 @@ require (
|
||||
github.com/pelletier/go-toml/v2 v2.2.2
|
||||
github.com/spf13/cobra v1.8.1
|
||||
github.com/spf13/viper v1.19.0
|
||||
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc
|
||||
gotest.tools/v3 v3.5.1
|
||||
)
|
||||
|
||||
@@ -140,6 +139,7 @@ require (
|
||||
go.etcd.io/bbolt v1.3.8 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/crypto v0.26.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect
|
||||
golang.org/x/net v0.28.0 // indirect
|
||||
golang.org/x/sync v0.8.0 // indirect
|
||||
golang.org/x/sys v0.24.0 // indirect
|
||||
|
||||
Reference in New Issue
Block a user