diff --git a/cmd/skopeo/list_tags.go b/cmd/skopeo/list_tags.go index fa271e44..4b16f506 100644 --- a/cmd/skopeo/list_tags.go +++ b/cmd/skopeo/list_tags.go @@ -6,7 +6,8 @@ import ( "errors" "fmt" "io" - "sort" + "maps" + "slices" "strings" "github.com/containers/common/pkg/retry" @@ -16,7 +17,6 @@ import ( "github.com/containers/image/v5/transports/alltransports" "github.com/containers/image/v5/types" "github.com/spf13/cobra" - "golang.org/x/exp/maps" ) // tagListOutput is the output format of (skopeo list-tags), primarily so that we can format it with a simple json.MarshalIndent. @@ -38,8 +38,7 @@ var transportHandlers = map[string]func(ctx context.Context, sys *types.SystemCo // supportedTransports returns all the supported transports func supportedTransports(joinStr string) string { - res := maps.Keys(transportHandlers) - sort.Strings(res) + res := slices.Sorted(maps.Keys(transportHandlers)) return strings.Join(res, joinStr) } diff --git a/go.mod b/go.mod index 5e376be2..3bba2ba4 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,6 @@ require ( github.com/spf13/cobra v1.9.1 github.com/spf13/pflag v1.0.6 github.com/stretchr/testify v1.10.0 - golang.org/x/exp v0.0.0-20250103183323-7d7fa50e5329 golang.org/x/term v0.30.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -124,6 +123,7 @@ require ( go.opentelemetry.io/otel/metric v1.31.0 // indirect go.opentelemetry.io/otel/trace v1.31.0 // indirect golang.org/x/crypto v0.35.0 // indirect + golang.org/x/exp v0.0.0-20250103183323-7d7fa50e5329 // indirect golang.org/x/mod v0.22.0 // indirect golang.org/x/net v0.36.0 // indirect golang.org/x/oauth2 v0.25.0 // indirect