Skip to content

Commit a39caea

Browse files
committed
Replacing context.TODO instances
1 parent 037bf55 commit a39caea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backends/azure/azure.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ func New(ctx context.Context, opt Options) (*Backend, error) {
222222
metricCalls.WithLabelValues("create-container").Inc()
223223
metricLastCallTimestamp.WithLabelValues("create-container").SetToCurrentTime()
224224

225-
_, err := client.CreateContainer(context.TODO(), opt.Container, &azblob.CreateContainerOptions{
225+
_, err := client.CreateContainer(ctx, opt.Container, &azblob.CreateContainerOptions{
226226
Metadata: map[string]*string{"hello": to.Ptr("world")},
227227
})
228228

@@ -308,7 +308,7 @@ func (b *Backend) doList(ctx context.Context, prefix string) (simpleblob.BlobLis
308308
blobPager := b.client.NewListBlobsFlatPager(b.opt.Container, nil)
309309

310310
for blobPager.More() {
311-
resp, err := blobPager.NextPage(context.TODO())
311+
resp, err := blobPager.NextPage(ctx)
312312

313313
if err != nil {
314314
return nil, err
@@ -375,7 +375,7 @@ func (b *Backend) doLoadReader(ctx context.Context, name string) (io.ReadCloser,
375375
metricLastCallTimestamp.WithLabelValues("load").SetToCurrentTime()
376376

377377
// Download the blob's contents and ensure that the download worked properly
378-
blobDownloadResponse, err := b.client.DownloadStream(context.TODO(), b.opt.Container, name, nil)
378+
blobDownloadResponse, err := b.client.DownloadStream(ctx, b.opt.Container, name, nil)
379379
if err != nil {
380380
return nil, err
381381
}

0 commit comments

Comments
 (0)