use go 1.22.2 (#2826)

This commit is contained in:
mmetc 2024-04-25 15:11:08 +02:00 committed by GitHub
parent ceb4479ec4
commit 2abc078e53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 20 additions and 15 deletions

View file

@ -33,7 +33,7 @@ jobs:
- name: "Set up Go" - name: "Set up Go"
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: "1.21.9" go-version: "1.22.2"
- name: "Install bats dependencies" - name: "Install bats dependencies"
env: env:

View file

@ -36,7 +36,7 @@ jobs:
- name: "Set up Go" - name: "Set up Go"
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: "1.21.9" go-version: "1.22.2"
- name: "Install bats dependencies" - name: "Install bats dependencies"
env: env:

View file

@ -45,7 +45,7 @@ jobs:
- name: "Set up Go" - name: "Set up Go"
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: "1.21.9" go-version: "1.22.2"
- name: "Install bats dependencies" - name: "Install bats dependencies"
env: env:

View file

@ -28,7 +28,7 @@ jobs:
- name: "Set up Go" - name: "Set up Go"
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: "1.21.9" go-version: "1.22.2"
- name: "Install bats dependencies" - name: "Install bats dependencies"
env: env:

View file

@ -35,7 +35,7 @@ jobs:
- name: "Set up Go" - name: "Set up Go"
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: "1.21.9" go-version: "1.22.2"
- name: Build - name: Build
run: make windows_installer BUILD_RE2_WASM=1 run: make windows_installer BUILD_RE2_WASM=1

View file

@ -52,7 +52,7 @@ jobs:
- name: "Set up Go" - name: "Set up Go"
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: "1.21.9" go-version: "1.22.2"
cache-dependency-path: "**/go.sum" cache-dependency-path: "**/go.sum"
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.

View file

@ -34,7 +34,7 @@ jobs:
- name: "Set up Go" - name: "Set up Go"
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: "1.21.9" go-version: "1.22.2"
- name: Build - name: Build
run: | run: |

View file

@ -126,7 +126,7 @@ jobs:
- name: "Set up Go" - name: "Set up Go"
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: "1.21.9" go-version: "1.22.2"
- name: Create localstack streams - name: Create localstack streams
run: | run: |

View file

@ -25,7 +25,7 @@ jobs:
- name: "Set up Go" - name: "Set up Go"
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: "1.21.9" go-version: "1.22.2"
- name: Build the binaries - name: Build the binaries
run: | run: |

View file

@ -144,6 +144,13 @@ linters:
- structcheck - structcheck
- varcheck - varcheck
#
# Disabled until fixed for go 1.22
#
- copyloopvar # copyloopvar is a linter detects places where loop variables are copied
- intrange # intrange is a linter to find places where for loops could make use of an integer range.
# #
# Enabled # Enabled
# #
@ -152,7 +159,6 @@ linters:
# - asciicheck # checks that all code identifiers does not have non-ASCII symbols in the name # - asciicheck # checks that all code identifiers does not have non-ASCII symbols in the name
# - bidichk # Checks for dangerous unicode character sequences # - bidichk # Checks for dangerous unicode character sequences
# - bodyclose # checks whether HTTP response body is closed successfully # - bodyclose # checks whether HTTP response body is closed successfully
# - copyloopvar # copyloopvar is a linter detects places where loop variables are copied
# - cyclop # checks function and package cyclomatic complexity # - cyclop # checks function and package cyclomatic complexity
# - decorder # check declaration order and count of types, constants, variables and functions # - decorder # check declaration order and count of types, constants, variables and functions
# - depguard # Go linter that checks if package imports are in a list of acceptable packages # - depguard # Go linter that checks if package imports are in a list of acceptable packages
@ -181,7 +187,6 @@ linters:
# - importas # Enforces consistent import aliases # - importas # Enforces consistent import aliases
# - ineffassign # Detects when assignments to existing variables are not used # - ineffassign # Detects when assignments to existing variables are not used
# - interfacebloat # A linter that checks the number of methods inside an interface. # - interfacebloat # A linter that checks the number of methods inside an interface.
# - intrange # intrange is a linter to find places where for loops could make use of an integer range.
# - lll # Reports long lines # - lll # Reports long lines
# - loggercheck # (logrlint): Checks key value pairs for common logger libraries (kitlog,klog,logr,zap). # - loggercheck # (logrlint): Checks key value pairs for common logger libraries (kitlog,klog,logr,zap).
# - logrlint # Check logr arguments. # - logrlint # Check logr arguments.

View file

@ -1,5 +1,5 @@
# vim: set ft=dockerfile: # vim: set ft=dockerfile:
FROM golang:1.21.9-alpine3.18 AS build FROM golang:1.22.2-alpine3.18 AS build
ARG BUILD_VERSION ARG BUILD_VERSION

View file

@ -1,5 +1,5 @@
# vim: set ft=dockerfile: # vim: set ft=dockerfile:
FROM golang:1.21.9-bookworm AS build FROM golang:1.22.2-bookworm AS build
ARG BUILD_VERSION ARG BUILD_VERSION

View file

@ -21,7 +21,7 @@ stages:
- task: GoTool@0 - task: GoTool@0
displayName: "Install Go" displayName: "Install Go"
inputs: inputs:
version: '1.21.9' version: '1.22.2'
- pwsh: | - pwsh: |
choco install -y make choco install -y make

2
go.mod
View file

@ -1,6 +1,6 @@
module github.com/crowdsecurity/crowdsec module github.com/crowdsecurity/crowdsec
go 1.21 go 1.22
// Don't use the toolchain directive to avoid uncontrolled downloads during // Don't use the toolchain directive to avoid uncontrolled downloads during
// a build, especially in sandboxed environments (freebsd, gentoo...). // a build, especially in sandboxed environments (freebsd, gentoo...).