Skip to content

Commit 89150e1

Browse files
ldeztraefiker
authored andcommitted
Update to go1.13rc1
1 parent e1831c4 commit 89150e1

File tree

12 files changed

+127
-60
lines changed

12 files changed

+127
-60
lines changed

.golangci.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"gochecknoinits",
3838
"gochecknoglobals",
3939
"bodyclose", # Too many false-positive and panics.
40+
"typecheck", # v1.17.1 and Go1.13 => bug
4041
]
4142

4243
[issues]

.semaphoreci/golang.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
set -e
44

5-
curl -O https://dl.google.com/go/go1.12.linux-amd64.tar.gz
5+
curl -O https://dl.google.com/go/go"${GO_VERSION}".linux-amd64.tar.gz
66

7-
tar -xvf go1.12.linux-amd64.tar.gz
8-
rm -rf go1.12.linux-amd64.tar.gz
7+
tar -xvf go"${GO_VERSION}".linux-amd64.tar.gz
8+
rm -rf go"${GO_VERSION}".linux-amd64.tar.gz
99

10-
sudo mkdir -p /usr/local/golang/1.12/go
11-
sudo mv go /usr/local/golang/1.12/
10+
sudo mkdir -p /usr/local/golang/"${GO_VERSION}"/go
11+
sudo mv go /usr/local/golang/"${GO_VERSION}"/
1212

1313
sudo rm /usr/local/bin/go
14-
sudo chmod +x /usr/local/golang/1.12/go/bin/go
15-
sudo ln -s /usr/local/golang/1.12/go/bin/go /usr/local/bin/go
14+
sudo chmod +x /usr/local/golang/"${GO_VERSION}"/go/bin/go
15+
sudo ln -s /usr/local/golang/"${GO_VERSION}"/go/bin/go /usr/local/bin/go
1616

17-
export GOROOT="/usr/local/golang/1.12/go"
18-
export GOTOOLDIR="/usr/local/golang/1.12/go/pkg/tool/linux_amd64"
17+
export GOROOT="/usr/local/golang/${GO_VERSION}/go"
18+
export GOTOOLDIR="/usr/local/golang/${GO_VERSION}/go/pkg/tool/linux_amd64"
1919

2020
go version

.semaphoreci/setup.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ sudo dd if=/dev/zero of=/swapfile bs=1M count=3072
77
sudo mkswap /swapfile
88
sudo swapon /swapfile
99
sudo rm -rf /home/runner/.rbenv
10+
sudo rm -rf /usr/local/golang/{1.4.3,1.5.4,1.6.4,1.7.6,1.8.6,1.9.7,1.10.3,1.11}
1011
#export DOCKER_VERSION=18.06.3
1112
source .semaphoreci/vars
1213
if [ -z "${PULL_REQUEST_NUMBER}" ]; then SHOULD_TEST="-*-"; else TEMP_STORAGE=$(curl --silent https://patch-diff.githubusercontent.com/raw/containous/traefik/pull/${PULL_REQUEST_NUMBER}.diff | patch --dry-run -p1 -R || true); fi
@@ -16,12 +17,22 @@ echo ${TEMP_STORAGE}
1617
echo ${SHOULD_TEST}
1718
#if [ -n "$SHOULD_TEST" ]; then sudo -E apt-get -yq update; fi
1819
#if [ -n "$SHOULD_TEST" ]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install docker-ce=${DOCKER_VERSION}*; fi
19-
if [ -n "$SHOULD_TEST" ]; then docker version; fi
20+
if [ -n "$SHOULD_TEST" ]; then docker version; fi
21+
22+
export GO_VERSION=1.12
23+
if [ -f "./go.mod" ]; then GO_VERSION="$(grep '^go .*' go.mod | awk '{print $2}')"; export GO_VERSION; fi
24+
if [ "${GO_VERSION}" == '1.13' ]; then export GO_VERSION=1.13rc1; fi
25+
echo "Selected Go version: ${GO_VERSION}"
26+
2027
if [ -f "./.semaphoreci/golang.sh" ]; then ./.semaphoreci/golang.sh; fi
21-
if [ -f "./.semaphoreci/golang.sh" ]; then export GOROOT="/usr/local/golang/1.12/go"; fi
22-
if [ -f "./.semaphoreci/golang.sh" ]; then export GOTOOLDIR="/usr/local/golang/1.12/go/pkg/tool/linux_amd64"; fi
28+
if [ -f "./.semaphoreci/golang.sh" ]; then export GOROOT="/usr/local/golang/${GO_VERSION}/go"; fi
29+
if [ -f "./.semaphoreci/golang.sh" ]; then export GOTOOLDIR="/usr/local/golang/${GO_VERSION}/go/pkg/tool/linux_amd64"; fi
30+
go version
31+
2332
if [ -f "./go.mod" ]; then export GO111MODULE=on; fi
2433
if [ -f "./go.mod" ]; then export GOPROXY=https://proxy.golang.org; fi
2534
if [ -f "./go.mod" ]; then go mod download; fi
26-
sudo rm -rf /usr/local/golang/1.4.3/ /usr/local/golang/1.5.4/ /usr/local/golang/1.6.4 /usr/local/golang/1.7.6 /usr/local/golang/1.8.6 /usr/local/golang/1.9.7 /usr/local/golang/1.10.3
35+
2736
df
37+
38+

build.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.12-alpine
1+
FROM golang:1.13rc1-alpine
22

33
RUN apk --update upgrade \
44
&& apk --no-cache --no-progress add git mercurial bash gcc musl-dev curl tar ca-certificates tzdata \

cmd/traefik/traefik.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ import (
3333
"github.com/vulcand/oxy/roundrobin"
3434
)
3535

36-
func init() {
37-
goDebug := os.Getenv("GODEBUG")
38-
if len(goDebug) > 0 {
39-
goDebug += ","
40-
}
41-
os.Setenv("GODEBUG", goDebug+"tls13=1")
42-
}
43-
4436
func main() {
4537
// traefik config inits
4638
tConfig := cmd.NewTraefikConfiguration()

docs/content/contributing/building-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Successfully tagged traefik-webui:latest
2828
[...]
2929
docker build -t "traefik-dev:4475--feature-documentation" -f build.Dockerfile .
3030
Sending build context to Docker daemon 279MB
31-
Step 1/10 : FROM golang:1.12-alpine
31+
Step 1/10 : FROM golang:1.13rc1-alpine
3232
---> f4bfb3d22bda
3333
[...]
3434
Successfully built 5c3c1a911277
@@ -60,7 +60,7 @@ PRE_TARGET= make test-unit
6060

6161
Requirements:
6262

63-
- `go` v1.12+
63+
- `go` v1.13+
6464
- environment variable `GO111MODULE=on`
6565

6666
!!! tip "Source Directory"

exp.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN yarn install
1212
RUN npm run build
1313

1414
# BUILD
15-
FROM golang:1.12-alpine as gobuild
15+
FROM golang:1.13rc1-alpine as gobuild
1616

1717
RUN apk --update upgrade \
1818
&& apk --no-cache --no-progress add git mercurial bash gcc musl-dev curl tar ca-certificates tzdata \

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/containous/traefik/v2
22

3-
go 1.12
3+
go 1.13
44

55
require (
66
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect

integration/fixtures/https/clientca/https_2ca1config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
[http.services.service1]
3232
[http.services.service1.loadBalancer]
3333
[[http.services.service1.loadBalancer.servers]]
34-
url = "http://127.0.0.1:9010"
34+
url = "{{ .Server1 }}"
3535

3636
[http.services.service2]
3737
[http.services.service2.loadBalancer]
3838
[[http.services.service2.loadBalancer.servers]]
39-
url = "http://127.0.0.1:9020"
39+
url = "{{ .Server2 }}"
4040

4141
[[tls.certificates]]
4242
certFile = "fixtures/https/snitest.com.cert"

integration/fixtures/https/clientca/https_2ca2config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
[http.services.service1]
3131
[http.services.service1.loadBalancer]
3232
[[http.services.service1.loadBalancer.servers]]
33-
url = "http://127.0.0.1:9010"
33+
url = "{{ .Server1 }}"
3434

3535
[http.services.service2]
3636
[http.services.service2.loadBalancer]
3737
[[http.services.service2.loadBalancer.servers]]
38-
url = "http://127.0.0.1:9020"
38+
url = "{{ .Server2 }}"
3939

4040
[[tls.certificates]]
4141
certFile = "fixtures/https/snitest.com.cert"

0 commit comments

Comments
 (0)