⬆️ Bump to go 1.19 (#37)

* ⬆️ Bump to go 1.19

* ⬆️ Remove depreciated function and replace io/utils calls
This commit is contained in:
mathieuHa
2022-11-19 20:40:03 +01:00
committed by GitHub
parent be150e8aca
commit 24c7801dac
5 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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)
}