mirror of
https://github.com/gin-gonic/gin.git
synced 2026-04-29 23:23:18 +08:00
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>
This commit is contained in:
parent
e949e5eef8
commit
d377fae8f1
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…
x
Reference in New Issue
Block a user