mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 11:38:59 +02:00
fix lint
This commit is contained in:
+2
-3
@@ -304,7 +304,7 @@ func handleStreamCache(a *Bouncer, initialized bool) {
|
|||||||
a.crowdsecStreamHealthy = true
|
a.crowdsecStreamHealthy = true
|
||||||
}
|
}
|
||||||
|
|
||||||
func crowdsecQuery(a *Bouncer, stringURL string) ([]byte) {
|
func crowdsecQuery(a *Bouncer, stringURL string) []byte {
|
||||||
req, _ := http.NewRequest(http.MethodGet, stringURL, nil)
|
req, _ := http.NewRequest(http.MethodGet, stringURL, nil)
|
||||||
req.Header.Add(crowdsecAuthHeader, a.crowdsecKey)
|
req.Header.Add(crowdsecAuthHeader, a.crowdsecKey)
|
||||||
res, err := a.client.Do(req)
|
res, err := a.client.Do(req)
|
||||||
@@ -318,7 +318,7 @@ func crowdsecQuery(a *Bouncer, stringURL string) ([]byte) {
|
|||||||
a.crowdsecStreamHealthy = false
|
a.crowdsecStreamHealthy = false
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
defer func (body io.ReadCloser) {
|
defer func(body io.ReadCloser) {
|
||||||
err = body.Close()
|
err = body.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("failed to close body reader: %s", err)
|
log.Printf("failed to close body reader: %s", err)
|
||||||
@@ -332,4 +332,3 @@ func crowdsecQuery(a *Bouncer, stringURL string) ([]byte) {
|
|||||||
}
|
}
|
||||||
return body
|
return body
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user