Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 9aba11f

Browse files
author
lijie
authored
Upgrade go version to 1.16 for issue #412 (#413)
Authored-by: lijie <lijie@pingcap.com>
1 parent 7e3ee7f commit 9aba11f

File tree

28 files changed

+36
-33
lines changed

28 files changed

+36
-33
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
steps:
88
- uses: actions/setup-go@v1
99
with:
10-
go-version: 1.13.x
10+
go-version: 1.16.x
1111
- uses: actions/checkout@v2
1212

1313
- name: "build"

.github/workflows/build_workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
steps:
88
- uses: actions/setup-go@v1
99
with:
10-
go-version: 1.13.x
10+
go-version: 1.16.x
1111
- uses: actions/checkout@v2
1212

1313
- name: "build workflow"

.github/workflows/precheck.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
steps:
88
- uses: actions/setup-go@v1
99
with:
10-
go-version: 1.13.x
10+
go-version: 1.16.x
1111
- uses: actions/checkout@v2
1212

1313
- name: "tidy"
@@ -19,7 +19,7 @@ jobs:
1919
# TODO: this will hopefully be fixed by
2020
# https://github.com/actions/setup-go/issues/14
2121
export PATH=${PATH}:`go env GOPATH`/bin
22-
go get golang.org/x/tools/cmd/goimports
22+
go install golang.org/x/tools/cmd/goimports@latest
2323
make fmt
2424
2525
- name: "lint"
@@ -28,5 +28,5 @@ jobs:
2828
# TODO: this will hopefully be fixed by
2929
# https://github.com/actions/setup-go/issues/14
3030
export PATH=${PATH}:`go env GOPATH`/bin
31-
go get github.com/mgechev/revive@v1.0.2
31+
go install github.com/mgechev/revive@v1.0.2
3232
make lint

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
steps:
88
- uses: actions/setup-go@v1
99
with:
10-
go-version: 1.13.x
10+
go-version: 1.16.x
1111
- uses: actions/checkout@v2
1212

1313
- name: "test"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax = docker/dockerfile:1.0-experimental
2-
FROM golang:alpine3.10 AS build_base
2+
FROM golang:alpine3.13 AS build_base
33

44
RUN apk add --no-cache gcc libc-dev make bash git
55

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ ifeq (, $(shell which goimports))
177177
set -e ;\
178178
TMP_DIR=$$(mktemp -d) ;\
179179
cd $$TMP_DIR ;\
180-
GO111MODULE=on go get golang.org/x/tools/cmd/goimports ;\
180+
GO111MODULE=on go install golang.org/x/tools/cmd/goimports@latest ;\
181+
go mod download golang.org/x/net\
181182
rm -rf $$TMP_DIR ;\
182183
}
183184
endif
@@ -188,7 +189,7 @@ ifeq (, $(shell which jsonnet))
188189
set -e ;\
189190
TMP_DIR=$$(mktemp -d) ;\
190191
cd $$TMP_DIR ;\
191-
GO111MODULE=on go get github.com/google/go-jsonnet/cmd/jsonnet ;\
192+
GO111MODULE=on go install github.com/google/go-jsonnet/cmd/jsonnet@latest ;\
192193
rm -rf $$TMP_DIR ;\
193194
}
194195
endif
@@ -199,7 +200,7 @@ ifeq (, $(shell which jsonnetfmt))
199200
set -e ;\
200201
TMP_DIR=$$(mktemp -d) ;\
201202
cd $$TMP_DIR ;\
202-
GO111MODULE=on go get github.com/google/go-jsonnet/cmd/jsonnetfmt ;\
203+
GO111MODULE=on go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest ;\
203204
rm -rf $$TMP_DIR ;\
204205
}
205206
endif
@@ -210,7 +211,7 @@ ifeq (, $(shell which yq))
210211
set -e ;\
211212
TMP_DIR=$$(mktemp -d) ;\
212213
cd $$TMP_DIR ;\
213-
GO111MODULE=on go get github.com/mikefarah/yq/v4@v4.4.1 ;\
214+
GO111MODULE=on go install github.com/mikefarah/yq/v4@v4.4.1 ;\
214215
rm -rf $$TMP_DIR ;\
215216
}
216217
endif
@@ -221,7 +222,7 @@ ifeq (, $(shell which jb))
221222
set -e ;\
222223
TMP_DIR=$$(mktemp -d) ;\
223224
cd $$TMP_DIR ;\
224-
GO111MODULE=on go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb ;\
225+
GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest ;\
225226
rm -rf $$TMP_DIR ;\
226227
}
227228
endif
@@ -250,7 +251,7 @@ test:
250251
find testcase -mindepth 1 -maxdepth 1 -type d | xargs -I% sh -c 'cd %; make test';
251252

252253
image:
253-
DOCKER_BUILDKIT=1 docker build -t ${DOCKER_REGISTRY_PREFIX}pingcap/tipocket:latest .
254+
DOCKER_BUILDKIT=1 docker build --platform linux/amd64 -t ${DOCKER_REGISTRY_PREFIX}pingcap/tipocket:latest .
254255

255256
docker-push:
256257
docker push ${DOCKER_REGISTRY_PREFIX}pingcap/tipocket:latest

go.mod

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

3-
go 1.13
3+
go 1.16
44

55
require (
66
cloud.google.com/go v0.49.0 // indirect

logsearch/go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
860860
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
861861
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
862862
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
863+
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
863864
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
864865
gotest.tools v2.1.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
865866
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=

pkg/scaffolds/template/testcase/go.module.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (g *GoModule) SetTemplateDefaults() error {
3939

4040
const goModuleTemplate = `module github.com/pingcap/tipocket/testcase/{{ .CaseName }}
4141
42-
go 1.15
42+
go 1.16
4343
4444
require (
4545
github.com/go-sql-driver/mysql v1.5.0

testcase/bank/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/pingcap/tipocket/testcase/bank
22

3-
go 1.15
3+
go 1.16
44

55
require (
66
github.com/juju/errors v0.0.0-20190930114154-d42613fe1ab9

0 commit comments

Comments
 (0)