chore: update to go1.20

This commit is contained in:
Ludovic Fernandez 2023-02-23 15:06:05 +01:00 committed by GitHub
parent dd710dbeb7
commit 7202038649
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 13 additions and 11 deletions

View file

@ -6,7 +6,7 @@ on:
- '*' - '*'
env: env:
GO_VERSION: 1.19 GO_VERSION: '1.20'
CGO_ENABLED: 0 CGO_ENABLED: 0
IN_DOCKER: "" IN_DOCKER: ""

View file

@ -6,7 +6,7 @@ on:
- '*' - '*'
env: env:
GO_VERSION: 1.19 GO_VERSION: '1.20'
IN_DOCKER: "" IN_DOCKER: ""
jobs: jobs:

View file

@ -6,8 +6,8 @@ on:
- '*' - '*'
env: env:
GO_VERSION: 1.19 GO_VERSION: '1.20'
GOLANGCI_LINT_VERSION: v1.50.0 GOLANGCI_LINT_VERSION: v1.51.2
MISSSPELL_VERSION: v0.4.0 MISSSPELL_VERSION: v0.4.0
IN_DOCKER: "" IN_DOCKER: ""

View file

@ -19,7 +19,7 @@ global_job_config:
prologue: prologue:
commands: commands:
- curl -sSfL https://raw.githubusercontent.com/ldez/semgo/master/godownloader.sh | sudo sh -s -- -b "/usr/local/bin" - curl -sSfL https://raw.githubusercontent.com/ldez/semgo/master/godownloader.sh | sudo sh -s -- -b "/usr/local/bin"
- sudo semgo go1.19 - sudo semgo go1.20
- export "GOPATH=$(go env GOPATH)" - export "GOPATH=$(go env GOPATH)"
- export "SEMAPHORE_GIT_DIR=${GOPATH}/src/github.com/traefik/${SEMAPHORE_PROJECT_NAME}" - export "SEMAPHORE_GIT_DIR=${GOPATH}/src/github.com/traefik/${SEMAPHORE_PROJECT_NAME}"
- export "PATH=${GOPATH}/bin:${PATH}" - export "PATH=${GOPATH}/bin:${PATH}"

View file

@ -1,4 +1,4 @@
FROM golang:1.19-alpine FROM golang:1.20-alpine
RUN apk --no-cache --no-progress add git mercurial bash gcc musl-dev curl tar ca-certificates tzdata \ RUN apk --no-cache --no-progress add git mercurial bash gcc musl-dev curl tar ca-certificates tzdata \
&& update-ca-certificates \ && update-ca-certificates \

View file

@ -12,7 +12,7 @@ RUN yarn install
RUN yarn build RUN yarn build
# BUILD # BUILD
FROM golang:1.19-alpine as gobuild FROM golang:1.20-alpine as gobuild
RUN apk --no-cache --no-progress add git mercurial bash gcc musl-dev curl tar ca-certificates tzdata \ RUN apk --no-cache --no-progress add git mercurial bash gcc musl-dev curl tar ca-certificates tzdata \
&& update-ca-certificates \ && update-ca-certificates \

2
go.mod
View file

@ -1,6 +1,6 @@
module github.com/traefik/traefik/v2 module github.com/traefik/traefik/v2
go 1.19 go 1.20
require ( require (
github.com/BurntSushi/toml v1.2.1 github.com/BurntSushi/toml v1.2.1

View file

@ -20,6 +20,8 @@ import (
const collectorURL = "https://collect.traefik.io/9vxmmkcdmalbdi635d4jgc5p5rx0h7h8" const collectorURL = "https://collect.traefik.io/9vxmmkcdmalbdi635d4jgc5p5rx0h7h8"
// Collected data. // Collected data.
//
//nolint:musttag // cannot be changed for historical reasons.
type data struct { type data struct {
Version string Version string
Codename string Codename string

View file

@ -3,8 +3,8 @@ package buffering
import ( import (
"bytes" "bytes"
"context" "context"
"crypto/rand"
"math" "math"
"math/rand"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"testing" "testing"
@ -16,7 +16,7 @@ import (
func TestBuffering(t *testing.T) { func TestBuffering(t *testing.T) {
payload := make([]byte, math.MaxInt8) payload := make([]byte, math.MaxInt8)
rand.Read(payload) _, _ = rand.Read(payload)
testCases := []struct { testCases := []struct {
desc string desc string

View file

@ -1,4 +1,4 @@
FROM golang:1.19 FROM golang:1.20
ARG USER=$USER ARG USER=$USER
ARG UID=$UID ARG UID=$UID