Skip to content

Commit

Permalink
Merge pull request #20 from hanazuki/dualstack
Browse files Browse the repository at this point in the history
s3.Options.UseDualstack is deprecated
  • Loading branch information
hanazuki authored Dec 25, 2023
2 parents 72a7987 + 5330f78 commit 2fac3f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,11 @@ func main() {
config.s3 = s3.NewFromConfig(awsConfig, func(o *s3.Options) {
o.UsePathStyle = config.ForcePathStyle
o.UseAccelerate = config.Accelerate
o.UseDualstack = !config.NoDualStack
if config.NoDualStack {
o.EndpointOptions.UseDualStackEndpoint = aws.DualStackEndpointStateDisabled
} else {
o.EndpointOptions.UseDualStackEndpoint = aws.DualStackEndpointStateEnabled
}
})

conn, err := getConn()
Expand Down

0 comments on commit 2fac3f6

Please sign in to comment.