CI: enable linter "noctx" (#3528)

* CI: enable linter "noctx"

* rename NewRequestWithContext() -> PrepareRequest()
This commit is contained in:
mmetc 2025-03-24 15:16:40 +01:00 committed by GitHub
parent a718475422
commit c245b1e6f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 77 additions and 45 deletions

View file

@ -754,7 +754,13 @@ func (a *apic) UpdateAllowlists(ctx context.Context, allowlistsLinks []*modelsca
description = *link.Description
}
resp, err := defaultClient.GetClient().Get(*link.URL)
req, err := http.NewRequestWithContext(ctx, http.MethodGet, *link.URL, http.NoBody)
if err != nil {
log.Errorf("while pulling allowlist: %s", err)
continue
}
resp, err := defaultClient.GetClient().Do(req)
if err != nil {
log.Errorf("while pulling allowlist: %s", err)
continue