diff --git a/cmd/bucket-replication.go b/cmd/bucket-replication.go index 1a4fc49c1..cc90fc8a2 100644 --- a/cmd/bucket-replication.go +++ b/cmd/bucket-replication.go @@ -53,8 +53,6 @@ import ( "github.com/minio/minio/internal/once" "github.com/tinylib/msgp/msgp" "github.com/zeebo/xxh3" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) const ( @@ -780,8 +778,9 @@ func putReplicationOpts(ctx context.Context, sc string, objInfo ObjectInfo, part isSSEC := crypto.SSEC.IsEncrypted(objInfo.UserDefined) for k, v := range objInfo.UserDefined { + _, isValidSSEHeader := validSSEReplicationHeaders[k] // In case of SSE-C objects copy the allowed internal headers as well - if !isSSEC || !slices.Contains(maps.Keys(validSSEReplicationHeaders), k) { + if !isSSEC || !isValidSSEHeader { if stringsHasPrefixFold(k, ReservedMetadataPrefixLower) { continue } @@ -789,7 +788,7 @@ func putReplicationOpts(ctx context.Context, sc string, objInfo ObjectInfo, part continue } } - if slices.Contains(maps.Keys(validSSEReplicationHeaders), k) { + if isValidSSEHeader { meta[validSSEReplicationHeaders[k]] = v } else { meta[k] = v diff --git a/cmd/endpoint.go b/cmd/endpoint.go index d716050bd..48d1ce9c6 100644 --- a/cmd/endpoint.go +++ b/cmd/endpoint.go @@ -26,6 +26,7 @@ import ( "path/filepath" "reflect" "runtime" + "slices" "sort" "strconv" "strings" @@ -38,7 +39,6 @@ import ( "github.com/minio/minio/internal/mountinfo" "github.com/minio/pkg/v3/env" xnet "github.com/minio/pkg/v3/net" - "golang.org/x/exp/slices" ) // EndpointType - enum for endpoint type. diff --git a/cmd/erasure-healing.go b/cmd/erasure-healing.go index bd6abf137..4b896e76a 100644 --- a/cmd/erasure-healing.go +++ b/cmd/erasure-healing.go @@ -23,6 +23,7 @@ import ( "errors" "fmt" "io" + "slices" "strconv" "strings" "sync" @@ -32,7 +33,6 @@ import ( "github.com/minio/minio/internal/grid" "github.com/minio/minio/internal/logger" "github.com/minio/pkg/v3/sync/errgroup" - "golang.org/x/exp/slices" ) //go:generate stringer -type=healingMetric -trimprefix=healingMetric $GOFILE diff --git a/cmd/generic-handlers.go b/cmd/generic-handlers.go index 9298ee405..67b906391 100644 --- a/cmd/generic-handlers.go +++ b/cmd/generic-handlers.go @@ -33,8 +33,6 @@ import ( "github.com/minio/minio-go/v7/pkg/set" "github.com/minio/minio/internal/grid" xnet "github.com/minio/pkg/v3/net" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" "github.com/minio/minio/internal/amztime" "github.com/minio/minio/internal/config/dns" @@ -75,7 +73,7 @@ const ( // and must not set by clients func containsReservedMetadata(header http.Header) bool { for key := range header { - if slices.Contains(maps.Keys(validSSEReplicationHeaders), key) { + if _, ok := validSSEReplicationHeaders[key]; ok { return false } if stringsHasPrefixFold(key, ReservedMetadataPrefix) { diff --git a/cmd/metrics-v3-types.go b/cmd/metrics-v3-types.go index 859824ef8..0aa04efa6 100644 --- a/cmd/metrics-v3-types.go +++ b/cmd/metrics-v3-types.go @@ -20,6 +20,7 @@ package cmd import ( "context" "fmt" + "slices" "strings" "sync" @@ -27,7 +28,6 @@ import ( "github.com/minio/minio/internal/logger" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "golang.org/x/exp/slices" ) type collectorPath string diff --git a/cmd/object-api-utils.go b/cmd/object-api-utils.go index 15aa1f00e..45e29c00f 100644 --- a/cmd/object-api-utils.go +++ b/cmd/object-api-utils.go @@ -29,6 +29,7 @@ import ( "net/http" "path" "runtime" + "slices" "strconv" "strings" "sync" @@ -52,7 +53,6 @@ import ( "github.com/minio/pkg/v3/trie" "github.com/minio/pkg/v3/wildcard" "github.com/valyala/bytebufferpool" - "golang.org/x/exp/slices" ) const ( diff --git a/cmd/peer-s3-client.go b/cmd/peer-s3-client.go index 16395cf5d..a28dd1303 100644 --- a/cmd/peer-s3-client.go +++ b/cmd/peer-s3-client.go @@ -21,6 +21,7 @@ import ( "context" "errors" "fmt" + "slices" "sort" "strconv" "sync/atomic" @@ -29,7 +30,6 @@ import ( "github.com/minio/madmin-go/v3" "github.com/minio/minio/internal/grid" "github.com/minio/pkg/v3/sync/errgroup" - "golang.org/x/exp/slices" ) var errPeerOffline = errors.New("peer is offline") diff --git a/cmd/server-main.go b/cmd/server-main.go index c2ce86265..455853282 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -31,6 +31,7 @@ import ( "os/signal" "path/filepath" "runtime" + "slices" "strings" "syscall" "time" @@ -53,7 +54,6 @@ import ( "github.com/minio/minio/internal/logger" "github.com/minio/pkg/v3/certs" "github.com/minio/pkg/v3/env" - "golang.org/x/exp/slices" "gopkg.in/yaml.v2" ) diff --git a/cmd/signature-v4-utils.go b/cmd/signature-v4-utils.go index 5fa823aec..1569dec1c 100644 --- a/cmd/signature-v4-utils.go +++ b/cmd/signature-v4-utils.go @@ -23,6 +23,7 @@ import ( "encoding/hex" "io" "net/http" + "slices" "strconv" "strings" @@ -31,7 +32,6 @@ import ( xhttp "github.com/minio/minio/internal/http" "github.com/minio/minio/internal/logger" "github.com/minio/pkg/v3/policy" - "golang.org/x/exp/slices" ) // http Header "x-amz-content-sha256" == "UNSIGNED-PAYLOAD" indicates that the diff --git a/cmd/sts-handlers_test.go b/cmd/sts-handlers_test.go index 9e743ed50..0de49d49c 100644 --- a/cmd/sts-handlers_test.go +++ b/cmd/sts-handlers_test.go @@ -24,6 +24,7 @@ import ( "io" "os" "reflect" + "slices" "strings" "testing" "time" @@ -34,7 +35,6 @@ import ( cr "github.com/minio/minio-go/v7/pkg/credentials" "github.com/minio/minio-go/v7/pkg/set" "github.com/minio/pkg/v3/ldap" - "golang.org/x/exp/slices" ) func runAllIAMSTSTests(suite *TestSuiteIAM, c *check) { diff --git a/go.mod b/go.mod index 8215c97e2..d6c2b2465 100644 --- a/go.mod +++ b/go.mod @@ -89,7 +89,6 @@ require ( go.uber.org/zap v1.27.0 goftp.io/server/v2 v2.0.1 golang.org/x/crypto v0.29.0 - golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f golang.org/x/oauth2 v0.24.0 golang.org/x/sync v0.9.0 golang.org/x/sys v0.27.0 diff --git a/go.sum b/go.sum index ee4d48c40..3f21c2776 100644 --- a/go.sum +++ b/go.sum @@ -719,8 +719,6 @@ golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOM golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f h1:XdNn9LlyWAhLVp6P/i8QYBW+hlyhrhei9uErw2B5GJo= -golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:D5SMRVC3C2/4+F/DB1wZsLRnSNimn2Sp/NPsCrsv8ak= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=