mirror of
https://github.com/gin-gonic/gin.git
synced 2026-04-11 14:11:46 +08:00
ci: update Go version support to 1.25+ across CI and docs (#4550)
* ci: update Go version support to 1.25+ across CI and docs - Remove Go 1.24 from CI test matrix to only support 1.25 and 1.26 - Update documentation to require Go version 1.25 or above Signed-off-by: appleboy <appleboy.tw@gmail.com> * chore: increase required Go version for Gin to 1.25 - Update minimum required Go version for Gin from 1.24 to 1.25 - Revise related warning message and test expectations to match new version requirement Signed-off-by: appleboy <appleboy.tw@gmail.com> --------- Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
parent
38534e2bf9
commit
ae3f524974
2
.github/workflows/gin.yml
vendored
2
.github/workflows/gin.yml
vendored
@ -33,7 +33,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
go: ["1.24", "1.25", "1.26"]
|
||||
go: ["1.25", "1.26"]
|
||||
test-tags:
|
||||
[
|
||||
"",
|
||||
|
||||
@ -44,7 +44,7 @@ Gin combines the simplicity of Express.js-style routing with Go's performance ch
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- **Go version**: Gin requires [Go](https://go.dev/) version [1.24](https://go.dev/doc/devel/release#go1.24.0) or above
|
||||
- **Go version**: Gin requires [Go](https://go.dev/) version [1.25](https://go.dev/doc/devel/release#go1.25.0) or above
|
||||
- **Basic Go knowledge**: Familiarity with Go syntax and package management is helpful
|
||||
|
||||
### Installation
|
||||
|
||||
4
debug.go
4
debug.go
@ -13,7 +13,7 @@ import (
|
||||
"sync/atomic"
|
||||
)
|
||||
|
||||
const ginSupportMinGoVer = 24
|
||||
const ginSupportMinGoVer = 25
|
||||
|
||||
var runtimeVersion = runtime.Version()
|
||||
|
||||
@ -80,7 +80,7 @@ func getMinVer(v string) (uint64, error) {
|
||||
|
||||
func debugPrintWARNINGDefault() {
|
||||
if v, e := getMinVer(runtimeVersion); e == nil && v < ginSupportMinGoVer {
|
||||
debugPrint(`[WARNING] Now Gin requires Go 1.24+.
|
||||
debugPrint(`[WARNING] Now Gin requires Go 1.25+.
|
||||
|
||||
`)
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ func TestDebugPrintWARNINGDefaultWithUnsupportedVersion(t *testing.T) {
|
||||
debugPrintWARNINGDefault()
|
||||
SetMode(TestMode)
|
||||
})
|
||||
assert.Equal(t, "[GIN-debug] [WARNING] Now Gin requires Go 1.24+.\n\n[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)
|
||||
assert.Equal(t, "[GIN-debug] [WARNING] Now Gin requires Go 1.25+.\n\n[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)
|
||||
}
|
||||
|
||||
func TestDebugPrintWARNINGNew(t *testing.T) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user