فهرست منبع

chore: upgrade go to 1.19 (#3677)

Rene Leonhardt 1 سال پیش
والد
کامیت
34c5f6616c

+ 1 - 1
.github/workflows/codeql-analysis.yml

@@ -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

+ 5 - 5
.github/workflows/go.yml

@@ -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
@@ -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

+ 1 - 1
.github/workflows/issues.yml

@@ -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

+ 2 - 2
.github/workflows/release.yaml

@@ -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

+ 1 - 1
.github/workflows/reviewdog.yml

@@ -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 }}

+ 1 - 1
core/stringx/replacer_fuzz_test.go

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

+ 1 - 1
tools/goctl/go.mod

@@ -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

+ 1 - 1
tools/goctl/test/integration/model/mongo/Dockerfile

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

+ 9 - 9
tools/goctl/util/ctx/gomod_test.go

@@ -81,13 +81,13 @@ 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
 				},
 			},
@@ -95,7 +95,7 @@ func Test_getRealModule(t *testing.T) {
 				Path:      "bar",
 				Dir:       "/home/bar",
 				GoMod:     "/home/bar/go.mod",
-				GoVersion: "go1.18",
+				GoVersion: "go1.19",
 			},
 		},
 	}
@@ -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",
 				},
 			},
 		},
@@ -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",
 				},
 			},
 		},