Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use go 1.19 #302

Merged
merged 1 commit into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/e2e_test_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
go-version: 1.19.x
- name: Checkout code
uses: actions/checkout@v2
- name: Go build
Expand All @@ -43,7 +43,7 @@ jobs:
needs: job_1
strategy:
matrix:
go-version: [1.16.x, 1.17.x, 1.18.x]
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x]
runs-on: ubuntu-latest
steps:
- name: Install Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.45
version: v1.49

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
go-version: 1.19.x
- name: compile and release
run: |
./ci-build.sh
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
go-version: 1.19.x
- name: compile and release
run: |
./ci-build.sh
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
go-version: 1.19.x
- name: compile and release
run: |
./ci-build.sh
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
go-version: 1.19.x
- name: compile and release
run: |
./ci-build.sh
Expand All @@ -79,7 +79,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
go-version: 1.19.x
- name: compile and release
run: |
./ci-build.sh
Expand All @@ -96,7 +96,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
go-version: 1.19.x
- name: compile and release
run: |
./ci-build.sh
Expand All @@ -113,7 +113,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
go-version: 1.19.x
- name: compile and release
run: |
./ci-build.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
# We have generics code, so only 1.18+ can work
go-version: [1.18.x]
go-version: [1.19.x]
runs-on: ubuntu-latest
steps:
- name: Install Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ut_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: go test
strategy:
matrix:
go-version: [1.16.x, 1.17.x, 1.18.x]
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x]
runs-on: ubuntu-latest
steps:
- name: Install Go
Expand Down
16 changes: 8 additions & 8 deletions cmd/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ func init() {
rootCmd.AddCommand(diffCmd)
}

//goc diff --new-profile=./new.cov --base-profile=./base.cov
//+------------------------------------------------------+---------------+--------------+--------+
//| File | Base Coverage | New Coverage | Delta |
//+------------------------------------------------------+---------------+--------------+--------+
//| qiniu.com/kodo/bd/pfd/pfdstg/cursor/mgr.go | 53.5% | 50.5% | -3.0% |
//| qiniu.com/kodo/bd/pfd/pfdstg/svr/getstripe.go | 0.5% | 0.0% | -0.5% |
//| Total | 35.7% | 35.7% | -0.0% |
//+------------------------------------------------------+---------------+--------------+--------+
// goc diff --new-profile=./new.cov --base-profile=./base.cov
// +------------------------------------------------------+---------------+--------------+--------+
// | File | Base Coverage | New Coverage | Delta |
// +------------------------------------------------------+---------------+--------------+--------+
// | qiniu.com/kodo/bd/pfd/pfdstg/cursor/mgr.go | 53.5% | 50.5% | -3.0% |
// | qiniu.com/kodo/bd/pfd/pfdstg/svr/getstripe.go | 0.5% | 0.0% | -0.5% |
// | Total | 35.7% | 35.7% | -0.0% |
// +------------------------------------------------------+---------------+--------------+--------+
func doDiffForLocalProfiles(cmd *cobra.Command, args []string) {
localP, err := cover.ReadFileToCoverList(newProfile)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cover/cover.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ type CoverInfo struct {
Singleton bool
}

//Execute inject cover variables for all the .go files in the target folder
// Execute inject cover variables for all the .go files in the target folder
func Execute(coverInfo *CoverInfo) error {
target := coverInfo.Target
newGopath := coverInfo.GoPath
Expand Down
2 changes: 1 addition & 1 deletion pkg/cover/internal/tool/cover.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func (f *File) newCounter(start, end token.Pos, numStmt int) string {
// S1
// if cond {
// S2
// }
// }
// S3
//
// counters will be added before S1 and before S3. The block containing S2
Expand Down
2 changes: 1 addition & 1 deletion pkg/cover/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ type ProfileParam struct {
SkipFilePatterns []string `form:"skipfile" json:"skipfile"`
}

//listServices list all the registered services
// listServices list all the registered services
func (s *server) listServices(c *gin.Context) {
services := s.Store.GetAll()
c.JSON(http.StatusOK, services)
Expand Down
3 changes: 2 additions & 1 deletion pkg/prow/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ func (j *Job) RunPeriodic() error {
return nil
}

//trim github filename to profile format:
// trim github filename to profile format:
//
// src/qiniu.com/kodo/io/io/io_svr.go -> qiniu.com/kodo/io/io/io_svr.go
func trimGhFileToProfile(ghFiles []string) (pFiles []string) {
//TODO: need compatible other situation
Expand Down
2 changes: 1 addition & 1 deletion tests/samples/gomod_replace_library/bar.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package foo

import "fmt"

//Bar fake method
// Bar fake method
func Bar() {
fmt.Println("foo bar")
}