Merge pull request #7591 from mmorel-35/noctx

golangci-lint(noctx): fix test files
This commit is contained in:
danfeng
2024-05-13 13:29:07 +08:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -907,7 +907,9 @@ func getVeleroCliTarball(cliTarballUrl string) (*os.File, error) {
lastInd := strings.LastIndex(cliTarballUrl, "/")
tarball := cliTarballUrl[lastInd+1:]
resp, err := http.Get(cliTarballUrl)
cli := &http.Client{}
req, _ := http.NewRequestWithContext(context.Background(), http.MethodGet, cliTarballUrl, nil)
resp, err := cli.Do(req)
if err != nil {
return nil, errors.WithMessagef(err, "failed to access Velero CLI tarball")
}