Skip to content

Commit f2a3da8

Browse files
committed
Make use of getter's context
1 parent 050212a commit f2a3da8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

get_s3.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func (g *S3Getter) getAWSConfig(region string, url *url.URL, staticCreds *creden
245245
loadOptions = append(loadOptions, config.WithRegion(region))
246246
}
247247

248-
return config.LoadDefaultConfig(context.TODO(), loadOptions...)
248+
return config.LoadDefaultConfig(g.Context(), loadOptions...)
249249
}
250250

251251
func (g *S3Getter) parseUrl(u *url.URL) (region, bucket, path, version string, creds *credentials.StaticCredentialsProvider, err error) {
@@ -335,7 +335,7 @@ func (g *S3Getter) newS3Client(
335335
var cfg aws.Config
336336

337337
if profile := url.Query().Get("aws_profile"); profile != "" {
338-
cfg, err = config.LoadDefaultConfig(context.TODO(),
338+
cfg, err = config.LoadDefaultConfig(g.Context(),
339339
config.WithSharedConfigProfile(profile),
340340
)
341341
} else {

0 commit comments

Comments
 (0)