Skip to content

Commit

Permalink
chore: upgrade go to 1.19 (zeromicro#3677)
Browse files Browse the repository at this point in the history
  • Loading branch information
reneleonhardt authored Oct 28, 2023
1 parent 32600f2 commit 34c5f66
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.19
check-latest: true
Expand Down Expand Up @@ -47,12 +47,12 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
# use 1.18 to guarantee Go 1.18 compatibility
# use 1.19 to guarantee Go 1.19 compatibility
go-version: 1.19
check-latest: true
cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
close-issues:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
- uses: actions/stale@v8
with:
days-before-issue-stale: 365
days-before-issue-close: 90
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
- goarch: "386"
goos: darwin
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: zeromicro/go-zero-release-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.18.10.linux-amd64.tar.gz"
goversion: "https://dl.google.com/go/go1.19.13.linux-amd64.tar.gz"
project_path: "tools/goctl"
binary_name: "goctl"
extra_files: tools/goctl/readme.md tools/goctl/readme-cn.md
2 changes: 1 addition & 1 deletion .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
name: runner / staticcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: reviewdog/action-staticcheck@v1
with:
github_token: ${{ secrets.github_token }}
Expand Down
2 changes: 1 addition & 1 deletion core/stringx/replacer_fuzz_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build go1.18
//go:build go1.19

package stringx

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

go 1.18
go 1.19

require (
github.com/DATA-DOG/go-sqlmock v1.5.0
Expand Down
2 changes: 1 addition & 1 deletion tools/goctl/test/integration/model/mongo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18
FROM golang:1.19

ENV TZ Asia/Shanghai
ENV GOPROXY https://goproxy.cn,direct
Expand Down
18 changes: 9 additions & 9 deletions tools/goctl/util/ctx/gomod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,21 @@ func Test_getRealModule(t *testing.T) {
"Path":"foo",
"Dir":"/home/foo",
"GoMod":"/home/foo/go.mod",
"GoVersion":"go1.18"
"GoVersion":"go1.19"
}
{
"Path":"bar",
"Dir":"/home/bar",
"GoMod":"/home/bar/go.mod",
"GoVersion":"go1.18"
"GoVersion":"go1.19"
}`, nil
},
},
want: &Module{
Path: "bar",
Dir: "/home/bar",
GoMod: "/home/bar/go.mod",
GoVersion: "go1.18",
GoVersion: "go1.19",
},
},
}
Expand Down Expand Up @@ -143,26 +143,26 @@ func TestDecodePackages(t *testing.T) {
"Path":"foo",
"Dir":"/home/foo",
"GoMod":"/home/foo/go.mod",
"GoVersion":"go1.18"
"GoVersion":"go1.19"
}
{
"Path":"bar",
"Dir":"/home/bar",
"GoMod":"/home/bar/go.mod",
"GoVersion":"go1.18"
"GoVersion":"go1.19"
}`),
want: []Module{
{
Path: "foo",
Dir: "/home/foo",
GoMod: "/home/foo/go.mod",
GoVersion: "go1.18",
GoVersion: "go1.19",
},
{
Path: "bar",
Dir: "/home/bar",
GoMod: "/home/bar/go.mod",
GoVersion: "go1.18",
GoVersion: "go1.19",
},
},
},
Expand All @@ -173,14 +173,14 @@ func TestDecodePackages(t *testing.T) {
"Path":"foo",
"Dir":"/home/foo",
"GoMod":"/home/foo/go.mod",
"GoVersion":"go1.18"
"GoVersion":"go1.19"
}`),
want: []Module{
{
Path: "foo",
Dir: "/home/foo",
GoMod: "/home/foo/go.mod",
GoVersion: "go1.18",
GoVersion: "go1.19",
},
},
},
Expand Down

0 comments on commit 34c5f66

Please sign in to comment.