Skip to content
Myr

Fix the value of ginSupportMinGoVer constant by semantic (#3221)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by mstmdev · committed by GitHub · parent 92dd245 · Browse files · 2 files+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−3 removed

  • other:+3 added−3 removed

2 files+3 added−3 removed

modified:debug_test.go+1 added-1 removed
101 unmodified lines
102 debugPrintWARNINGDefault()103 SetMode(TestMode)104 })105 m, e := getMinVer(runtime.Version())106 if e == nil && m <= ginSupportMinGoVer {106 if e == nil && m < ginSupportMinGoVer {107 assert.Equal(t, "[GIN-debug] [WARNING] Now Gin requires Go 1.15+.\n\n[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)108 } else {109 assert.Equal(t, "[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)110 }
56 unmodified lines
modified:debug.go+2 added-2 removed
10 unmodified lines
11 "strconv"12 "strings"13)1415const ginSupportMinGoVer = 1415const ginSupportMinGoVer = 151617// IsDebugging returns true if the framework is running in debug mode.18// Use SetMode(gin.ReleaseMode) to disable debug mode.19func IsDebugging() bool {
45 unmodified lines
65 return strconv.ParseUint(v[first+1:last], 10, 64)66}6768func debugPrintWARNINGDefault() {69 if v, e := getMinVer(runtime.Version()); e == nil && v <= ginSupportMinGoVer {69 if v, e := getMinVer(runtime.Version()); e == nil && v < ginSupportMinGoVer {70 debugPrint(`[WARNING] Now Gin requires Go 1.15+.7172`)73 }
28 unmodified lines