mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 11:38:59 +02:00
⬆️ Bump to go 1.19 (#37)
* ⬆️ Bump to go 1.19 * ⬆️ Remove depreciated function and replace io/utils calls
This commit is contained in:
+2
-2
@@ -8,7 +8,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"text/template"
|
||||
@@ -357,7 +356,8 @@ func crowdsecQuery(bouncer *Bouncer, stringURL string) ([]byte, error) {
|
||||
logger.Error(fmt.Sprintf("failed to close body reader: %s", err.Error()))
|
||||
}
|
||||
}(res.Body)
|
||||
body, err := ioutil.ReadAll(res.Body)
|
||||
body, err := io.ReadAll(res.Body)
|
||||
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error while reading body: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user