⬆️ 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
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
go-version: [ 1.18, 1.x ]
go-version: [ 1.19, 1.x ]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
name: Main Process
runs-on: ubuntu-latest
env:
GO_VERSION: 1.18
GO_VERSION: 1.19
GOLANGCI_LINT_VERSION: v1.50.0
YAEGI_VERSION: v0.14.2
CGO_ENABLED: 0
+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)
}
+1 -1
View File
@@ -14,7 +14,7 @@ services:
- "--entrypoints.web.address=:80"
- "--experimental.plugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
- "--experimental.plugins.bouncer.version=v1.1.2"
- "--experimental.plugins.bouncer.version=v1.1.3"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "logs:/var/log/traefik"
+1 -1
View File
@@ -1,5 +1,5 @@
module github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
go 1.18
go 1.19
require github.com/leprosus/golang-ttl-map v1.1.7