Skip to content

Commit ba7b949

Browse files
committed
s3: fix deprecated EndpointResolver
Signed-off-by: CrazyMax <[email protected]>
1 parent 73862d1 commit ba7b949

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cache/remotecache/s3/s3.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"strings"
1212
"time"
1313

14+
"github.com/aws/aws-sdk-go-v2/aws"
1415
aws_config "github.com/aws/aws-sdk-go-v2/config"
1516
"github.com/aws/aws-sdk-go-v2/credentials"
1617
"github.com/aws/aws-sdk-go-v2/feature/s3/manager"
@@ -364,7 +365,7 @@ func newS3Client(ctx context.Context, config Config) (*s3Client, error) {
364365
}
365366
if config.EndpointURL != "" {
366367
options.UsePathStyle = config.UsePathStyle
367-
options.EndpointResolver = s3.EndpointResolverFromURL(config.EndpointURL)
368+
options.BaseEndpoint = aws.String(config.EndpointURL)
368369
}
369370
})
370371

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ require (
1010
github.com/Microsoft/hcsshim v0.11.4
1111
github.com/agext/levenshtein v1.2.3
1212
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2
13+
github.com/aws/aws-sdk-go-v2 v1.24.1
1314
github.com/aws/aws-sdk-go-v2/config v1.26.6
1415
github.com/aws/aws-sdk-go-v2/credentials v1.16.16
1516
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.15
@@ -108,7 +109,6 @@ require (
108109
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect
109110
github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0 // indirect
110111
github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 // indirect
111-
github.com/aws/aws-sdk-go-v2 v1.24.1 // indirect
112112
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect
113113
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 // indirect
114114
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 // indirect

0 commit comments

Comments
 (0)