Skip to content

Commit 6795ec7

Browse files
authored
feat: use go 1.19 (#302)
1 parent 4f377e5 commit 6795ec7

File tree

11 files changed

+26
-25
lines changed

11 files changed

+26
-25
lines changed

.github/workflows/e2e_test_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Install Go
1919
uses: actions/setup-go@v2
2020
with:
21-
go-version: 1.18.x
21+
go-version: 1.19.x
2222
- name: Checkout code
2323
uses: actions/checkout@v2
2424
- name: Go build
@@ -43,7 +43,7 @@ jobs:
4343
needs: job_1
4444
strategy:
4545
matrix:
46-
go-version: [1.16.x, 1.17.x, 1.18.x]
46+
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x]
4747
runs-on: ubuntu-latest
4848
steps:
4949
- name: Install Go

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
uses: golangci/golangci-lint-action@v2
1212
with:
1313
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
14-
version: v1.45
14+
version: v1.49
1515

1616
# Optional: working directory, useful for monorepos
1717
# working-directory: somedir

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Install Go
1212
uses: actions/setup-go@v2
1313
with:
14-
go-version: 1.18.x
14+
go-version: 1.19.x
1515
- name: compile and release
1616
run: |
1717
./ci-build.sh
@@ -28,7 +28,7 @@ jobs:
2828
- name: Install Go
2929
uses: actions/setup-go@v2
3030
with:
31-
go-version: 1.18.x
31+
go-version: 1.19.x
3232
- name: compile and release
3333
run: |
3434
./ci-build.sh
@@ -45,7 +45,7 @@ jobs:
4545
- name: Install Go
4646
uses: actions/setup-go@v2
4747
with:
48-
go-version: 1.18.x
48+
go-version: 1.19.x
4949
- name: compile and release
5050
run: |
5151
./ci-build.sh
@@ -62,7 +62,7 @@ jobs:
6262
- name: Install Go
6363
uses: actions/setup-go@v2
6464
with:
65-
go-version: 1.18.x
65+
go-version: 1.19.x
6666
- name: compile and release
6767
run: |
6868
./ci-build.sh
@@ -79,7 +79,7 @@ jobs:
7979
- name: Install Go
8080
uses: actions/setup-go@v2
8181
with:
82-
go-version: 1.18.x
82+
go-version: 1.19.x
8383
- name: compile and release
8484
run: |
8585
./ci-build.sh
@@ -96,7 +96,7 @@ jobs:
9696
- name: Install Go
9797
uses: actions/setup-go@v2
9898
with:
99-
go-version: 1.18.x
99+
go-version: 1.19.x
100100
- name: compile and release
101101
run: |
102102
./ci-build.sh
@@ -113,7 +113,7 @@ jobs:
113113
- name: Install Go
114114
uses: actions/setup-go@v2
115115
with:
116-
go-version: 1.18.x
116+
go-version: 1.19.x
117117
- name: compile and release
118118
run: |
119119
./ci-build.sh

.github/workflows/style_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
# We have generics code, so only 1.18+ can work
19-
go-version: [1.18.x]
19+
go-version: [1.19.x]
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Install Go

.github/workflows/ut_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: go test
1616
strategy:
1717
matrix:
18-
go-version: [1.16.x, 1.17.x, 1.18.x]
18+
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x]
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Install Go

cmd/diff.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ func init() {
9898
rootCmd.AddCommand(diffCmd)
9999
}
100100

101-
//goc diff --new-profile=./new.cov --base-profile=./base.cov
102-
//+------------------------------------------------------+---------------+--------------+--------+
103-
//| File | Base Coverage | New Coverage | Delta |
104-
//+------------------------------------------------------+---------------+--------------+--------+
105-
//| qiniu.com/kodo/bd/pfd/pfdstg/cursor/mgr.go | 53.5% | 50.5% | -3.0% |
106-
//| qiniu.com/kodo/bd/pfd/pfdstg/svr/getstripe.go | 0.5% | 0.0% | -0.5% |
107-
//| Total | 35.7% | 35.7% | -0.0% |
108-
//+------------------------------------------------------+---------------+--------------+--------+
101+
// goc diff --new-profile=./new.cov --base-profile=./base.cov
102+
// +------------------------------------------------------+---------------+--------------+--------+
103+
// | File | Base Coverage | New Coverage | Delta |
104+
// +------------------------------------------------------+---------------+--------------+--------+
105+
// | qiniu.com/kodo/bd/pfd/pfdstg/cursor/mgr.go | 53.5% | 50.5% | -3.0% |
106+
// | qiniu.com/kodo/bd/pfd/pfdstg/svr/getstripe.go | 0.5% | 0.0% | -0.5% |
107+
// | Total | 35.7% | 35.7% | -0.0% |
108+
// +------------------------------------------------------+---------------+--------------+--------+
109109
func doDiffForLocalProfiles(cmd *cobra.Command, args []string) {
110110
localP, err := cover.ReadFileToCoverList(newProfile)
111111
if err != nil {

pkg/cover/cover.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ type CoverInfo struct {
143143
Singleton bool
144144
}
145145

146-
//Execute inject cover variables for all the .go files in the target folder
146+
// Execute inject cover variables for all the .go files in the target folder
147147
func Execute(coverInfo *CoverInfo) error {
148148
target := coverInfo.Target
149149
newGopath := coverInfo.GoPath

pkg/cover/internal/tool/cover.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ func (f *File) newCounter(start, end token.Pos, numStmt int) string {
423423
// S1
424424
// if cond {
425425
// S2
426-
// }
426+
// }
427427
// S3
428428
//
429429
// counters will be added before S1 and before S3. The block containing S2

pkg/cover/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ type ProfileParam struct {
115115
SkipFilePatterns []string `form:"skipfile" json:"skipfile"`
116116
}
117117

118-
//listServices list all the registered services
118+
// listServices list all the registered services
119119
func (s *server) listServices(c *gin.Context) {
120120
services := s.Store.GetAll()
121121
c.JSON(http.StatusOK, services)

pkg/prow/job.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ func (j *Job) RunPeriodic() error {
131131
return nil
132132
}
133133

134-
//trim github filename to profile format:
134+
// trim github filename to profile format:
135+
//
135136
// src/qiniu.com/kodo/io/io/io_svr.go -> qiniu.com/kodo/io/io/io_svr.go
136137
func trimGhFileToProfile(ghFiles []string) (pFiles []string) {
137138
//TODO: need compatible other situation

0 commit comments

Comments
 (0)