Compare commits

...

5 Commits

Author SHA1 Message Date
Bo-Yi Wu
be70e87acc
chore: enhance code quality and consistency
- Add `gin.go` to the list of files with specific linters in `.golangci.yml`, applying the `gci` linter.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-05-09 09:04:46 +08:00
Bo-Yi Wu
4db2353f05
style: refactor codebase and update tests
- Add an empty line in the import section of `gin.go`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-05-09 08:49:23 +08:00
Bo-Yi Wu
a4f0cea628
chore: update dependencies and CI configurations
- Update Go version requirement from `1.20` to `1.21` in `go.mod`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-05-09 08:43:11 +08:00
Bo-Yi Wu
027da4a2b1
chore: refactor CI workflow and improve tests
- Update the golangci-lint-action version from `v5` to `v6` in the GitHub workflow configuration

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-05-09 08:41:58 +08:00
Bo-Yi Wu
d90191e3a4
chore: refine CI configuration and dependencies
- Remove dynamic Go versioning in favor of pinning to major version `1`
- Update linter version from `v1.56.2` to `v1.58.1` in GitHub Actions workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-05-09 08:38:32 +08:00
4 changed files with 8 additions and 5 deletions

View File

@ -22,12 +22,11 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
check-latest: true
go-version: "^1"
- name: Setup golangci-lint
uses: golangci/golangci-lint-action@v5
uses: golangci/golangci-lint-action@v6
with:
version: v1.56.2
version: v1.58.1
args: --verbose
test:
needs: lint

View File

@ -55,3 +55,6 @@ issues:
- linters:
- revive
path: _test\.go
- path: gin.go
linters:
- gci

1
gin.go
View File

@ -17,6 +17,7 @@ import (
"github.com/gin-gonic/gin/internal/bytesconv"
"github.com/gin-gonic/gin/render"
"github.com/quic-go/quic-go/http3"
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/gin-gonic/gin
go 1.20
go 1.21
require (
github.com/bytedance/sonic v1.11.6