Add noctx linter.

Signed-off-by: Xun Jiang <jxun@vmware.com>
This commit is contained in:
Xun Jiang
2023-11-28 10:57:35 +08:00
parent dbd1a12d9f
commit ec03d1ebce
2 changed files with 2 additions and 1 deletions

View File

@@ -330,6 +330,7 @@ linters:
- errchkjson
- ginkgolinter
- nilerr
- noctx
fast: false

View File

@@ -123,7 +123,7 @@ func Stream(ctx context.Context, kbClient kbclient.Client, namespace, name strin
ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout,
}
httpReq, err := http.NewRequest(http.MethodGet, created.Status.DownloadURL, nil)
httpReq, err := http.NewRequestWithContext(ctx, http.MethodGet, created.Status.DownloadURL, nil)
if err != nil {
return err
}