summaryrefslogtreecommitdiff
path: root/vendor/github.com/minio/minio-go/v7/pkg/s3utils/utils.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2025-04-07 11:05:51 +0100
committerLibravatar GitHub <noreply@github.com>2025-04-07 11:05:51 +0100
commitbce643286c6a136db47f2cf7bf3c4fa16a9d6a00 (patch)
treefa621fd5af6bb8fd26d28103b9c3f8d57c088f98 /vendor/github.com/minio/minio-go/v7/pkg/s3utils/utils.go
parent[chore]: Bump github.com/tdewolff/minify/v2 from 2.22.4 to 2.23.0 (#3974) (diff)
downloadgotosocial-bce643286c6a136db47f2cf7bf3c4fa16a9d6a00.tar.xz
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.85 to 7.0.89 (#3977)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.85 to 7.0.89. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.85...v7.0.89) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-version: 7.0.89 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/pkg/s3utils/utils.go')
-rw-r--r--vendor/github.com/minio/minio-go/v7/pkg/s3utils/utils.go40
1 files changed, 1 insertions, 39 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/s3utils/utils.go b/vendor/github.com/minio/minio-go/v7/pkg/s3utils/utils.go
index 80fd029d8..eb631249b 100644
--- a/vendor/github.com/minio/minio-go/v7/pkg/s3utils/utils.go
+++ b/vendor/github.com/minio/minio-go/v7/pkg/s3utils/utils.go
@@ -218,7 +218,7 @@ func IsAmazonPrivateLinkEndpoint(endpointURL url.URL) bool {
if endpointURL == sentinelURL {
return false
}
- return amazonS3HostPrivateLink.MatchString(endpointURL.Host)
+ return amazonS3HostPrivateLink.MatchString(endpointURL.Hostname())
}
// IsGoogleEndpoint - Match if it is exactly Google cloud storage endpoint.
@@ -261,44 +261,6 @@ func QueryEncode(v url.Values) string {
return buf.String()
}
-// TagDecode - decodes canonical tag into map of key and value.
-func TagDecode(ctag string) map[string]string {
- if ctag == "" {
- return map[string]string{}
- }
- tags := strings.Split(ctag, "&")
- tagMap := make(map[string]string, len(tags))
- var err error
- for _, tag := range tags {
- kvs := strings.SplitN(tag, "=", 2)
- if len(kvs) == 0 {
- return map[string]string{}
- }
- if len(kvs) == 1 {
- return map[string]string{}
- }
- tagMap[kvs[0]], err = url.PathUnescape(kvs[1])
- if err != nil {
- continue
- }
- }
- return tagMap
-}
-
-// TagEncode - encodes tag values in their URL encoded form. In
-// addition to the percent encoding performed by urlEncodePath() used
-// here, it also percent encodes '/' (forward slash)
-func TagEncode(tags map[string]string) string {
- if tags == nil {
- return ""
- }
- values := url.Values{}
- for k, v := range tags {
- values[k] = []string{v}
- }
- return QueryEncode(values)
-}
-
// if object matches reserved string, no need to encode them
var reservedObjectNames = regexp.MustCompile("^[a-zA-Z0-9-_.~/]+$")