mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-20 11:09:00 +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:
@@ -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:
|
||||
|
||||
@@ -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
@@ -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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user