mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
CI: enable linter "noctx" (#3528)
* CI: enable linter "noctx" * rename NewRequestWithContext() -> PrepareRequest()
This commit is contained in:
parent
a718475422
commit
c245b1e6f8
14 changed files with 77 additions and 45 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue