chore: upgrade go to 1.19 (#3677)

This commit is contained in:
Rene Leonhardt 2023-10-28 14:12:04 +02:00 committed by GitHub
parent 32600f2619
commit 34c5f6616c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 22 additions and 22 deletions

View File

@ -35,7 +35,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL

View File

@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Set up Go 1.x - name: Set up Go 1.x
uses: actions/setup-go@v3 uses: actions/setup-go@v4
with: with:
go-version: 1.19 go-version: 1.19
check-latest: true check-latest: true
@ -47,12 +47,12 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Checkout codebase - name: Checkout codebase
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Set up Go 1.x - name: Set up Go 1.x
uses: actions/setup-go@v3 uses: actions/setup-go@v4
with: with:
# use 1.18 to guarantee Go 1.18 compatibility # use 1.19 to guarantee Go 1.19 compatibility
go-version: 1.19 go-version: 1.19
check-latest: true check-latest: true
cache: true cache: true

View File

@ -7,7 +7,7 @@ jobs:
close-issues: close-issues:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v8
with: with:
days-before-issue-stale: 365 days-before-issue-stale: 365
days-before-issue-close: 90 days-before-issue-close: 90

View File

@ -16,13 +16,13 @@ jobs:
- goarch: "386" - goarch: "386"
goos: darwin goos: darwin
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: zeromicro/go-zero-release-action@master - uses: zeromicro/go-zero-release-action@master
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }} 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" project_path: "tools/goctl"
binary_name: "goctl" binary_name: "goctl"
extra_files: tools/goctl/readme.md tools/goctl/readme-cn.md extra_files: tools/goctl/readme.md tools/goctl/readme-cn.md

View File

@ -5,7 +5,7 @@ jobs:
name: runner / staticcheck name: runner / staticcheck
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: reviewdog/action-staticcheck@v1 - uses: reviewdog/action-staticcheck@v1
with: with:
github_token: ${{ secrets.github_token }} github_token: ${{ secrets.github_token }}

View File

@ -1,4 +1,4 @@
//go:build go1.18 //go:build go1.19
package stringx package stringx

View File

@ -1,6 +1,6 @@
module github.com/zeromicro/go-zero/tools/goctl module github.com/zeromicro/go-zero/tools/goctl
go 1.18 go 1.19
require ( require (
github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/DATA-DOG/go-sqlmock v1.5.0

View File

@ -1,4 +1,4 @@
FROM golang:1.18 FROM golang:1.19
ENV TZ Asia/Shanghai ENV TZ Asia/Shanghai
ENV GOPROXY https://goproxy.cn,direct ENV GOPROXY https://goproxy.cn,direct

View File

@ -81,13 +81,13 @@ func Test_getRealModule(t *testing.T) {
"Path":"foo", "Path":"foo",
"Dir":"/home/foo", "Dir":"/home/foo",
"GoMod":"/home/foo/go.mod", "GoMod":"/home/foo/go.mod",
"GoVersion":"go1.18" "GoVersion":"go1.19"
} }
{ {
"Path":"bar", "Path":"bar",
"Dir":"/home/bar", "Dir":"/home/bar",
"GoMod":"/home/bar/go.mod", "GoMod":"/home/bar/go.mod",
"GoVersion":"go1.18" "GoVersion":"go1.19"
}`, nil }`, nil
}, },
}, },
@ -95,7 +95,7 @@ func Test_getRealModule(t *testing.T) {
Path: "bar", Path: "bar",
Dir: "/home/bar", Dir: "/home/bar",
GoMod: "/home/bar/go.mod", GoMod: "/home/bar/go.mod",
GoVersion: "go1.18", GoVersion: "go1.19",
}, },
}, },
} }
@ -143,26 +143,26 @@ func TestDecodePackages(t *testing.T) {
"Path":"foo", "Path":"foo",
"Dir":"/home/foo", "Dir":"/home/foo",
"GoMod":"/home/foo/go.mod", "GoMod":"/home/foo/go.mod",
"GoVersion":"go1.18" "GoVersion":"go1.19"
} }
{ {
"Path":"bar", "Path":"bar",
"Dir":"/home/bar", "Dir":"/home/bar",
"GoMod":"/home/bar/go.mod", "GoMod":"/home/bar/go.mod",
"GoVersion":"go1.18" "GoVersion":"go1.19"
}`), }`),
want: []Module{ want: []Module{
{ {
Path: "foo", Path: "foo",
Dir: "/home/foo", Dir: "/home/foo",
GoMod: "/home/foo/go.mod", GoMod: "/home/foo/go.mod",
GoVersion: "go1.18", GoVersion: "go1.19",
}, },
{ {
Path: "bar", Path: "bar",
Dir: "/home/bar", Dir: "/home/bar",
GoMod: "/home/bar/go.mod", GoMod: "/home/bar/go.mod",
GoVersion: "go1.18", GoVersion: "go1.19",
}, },
}, },
}, },
@ -173,14 +173,14 @@ func TestDecodePackages(t *testing.T) {
"Path":"foo", "Path":"foo",
"Dir":"/home/foo", "Dir":"/home/foo",
"GoMod":"/home/foo/go.mod", "GoMod":"/home/foo/go.mod",
"GoVersion":"go1.18" "GoVersion":"go1.19"
}`), }`),
want: []Module{ want: []Module{
{ {
Path: "foo", Path: "foo",
Dir: "/home/foo", Dir: "/home/foo",
GoMod: "/home/foo/go.mod", GoMod: "/home/foo/go.mod",
GoVersion: "go1.18", GoVersion: "go1.19",
}, },
}, },
}, },