Skip to content

Commit

Permalink
Move to Go 1.21 (#2249)
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden authored Aug 16, 2023
1 parent e450cb3 commit f73a527
Show file tree
Hide file tree
Showing 17 changed files with 238 additions and 184 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v2
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.19.x
go-version: 1.21.x
id: go

- name: Check out code into the Go module directory
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integrate-cluster-cmd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v2
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.19.x
go-version: 1.21.x
id: go

- name: Check out code into the Go module directory
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integrate-cluster-scale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v2
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.19.x
go-version: 1.21.x
id: go

- name: Check out code into the Go module directory
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integrate-dm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v2
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.19.x
go-version: 1.21.x
id: go

- name: Check out code into the Go module directory
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integrate-playground.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v2
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.19.x
go-version: 1.21.x
id: go

- name: Check out code into the Go module directory
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/integrate-tiup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ jobs:
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v2
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.19.x
go-version: 1.21.x
id: go

- name: Check out code into the Go module directory
Expand Down Expand Up @@ -90,10 +90,10 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}

- name: Set up Go 1.19
uses: actions/setup-go@v2
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.19.x
go-version: 1.21.x
id: go

- name: make unit-test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-tiup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v2
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.19.x
go-version: 1.21.x
id: go

- name: Check out code into the Go module directory
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reprotest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ jobs:
strategy:
matrix:
go:
- 1.19.x
- 1.21.x

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,5 @@ tools/bin/revive: tools/check/go.mod
$(GO) build -o ../bin/revive github.com/mgechev/revive

tools/bin/golangci-lint:
@# Target: pull in specific version of golangci-lint (v1.50.0)
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./tools/bin v1.50.0
@# Target: pull in specific version of golangci-lint (v1.54.1)
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./tools/bin v1.54.1
2 changes: 1 addition & 1 deletion components/client/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/tiup/components/client

go 1.18
go 1.21

require (
github.com/gizak/termui/v3 v3.1.0
Expand Down
170 changes: 170 additions & 0 deletions components/client/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ You can build TiUP on any platform that supports Go.

Prerequisites:

* Go (minimum version: 1.18; [installation instructions](https://golang.org/doc/install))
* Go (minimum version: 1.21; [installation instructions](https://golang.org/doc/install))
* golint (`go get -u golang.org/x/lint/golint`)
* make

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pingcap/tiup

go 1.18
go 1.21

replace gopkg.in/yaml.v2 => github.com/july2993/yaml v0.0.0-20200423062752-adcfa5abe2ed

Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
Expand Down
38 changes: 16 additions & 22 deletions tools/check/go.mod
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
module github.com/pingcap/tidb/_tools

go 1.21

require (
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc // indirect
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect
github.com/chzchzchz/goword v0.0.0-20170907005317-a9744cb52b03
github.com/client9/misspell v0.3.4
github.com/dnephin/govet v0.0.0-20171012192244-4a96d43e39d3
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf // indirect
github.com/gordonklaus/ineffassign v0.0.0-20180909121442-1003c8bd00dc
github.com/kisielk/errcheck v1.2.0
github.com/mgechev/revive v1.2.4
github.com/nicksnyder/go-i18n v1.10.0 // indirect
github.com/pelletier/go-toml v1.2.0 // indirect
github.com/securego/gosec v0.0.0-20181211171558-12400f9a1ca7
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect
gopkg.in/alecthomas/gometalinter.v2 v2.0.12 // indirect
gopkg.in/alecthomas/gometalinter.v3 v3.0.0 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20170321130658-9670b87a702e // indirect
gopkg.in/yaml.v2 v2.2.2 // indirect
honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3
k8s.io/klog v1.0.0 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/fatih/structtag v1.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 // indirect
github.com/mgechev/revive v1.3.2 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/tools v0.9.1 // indirect
)

go 1.18
Loading

0 comments on commit f73a527

Please sign in to comment.