Skip to content
Myr

fix error gin support min Go version (#2584)

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

authored by Qt · committed by GitHub · parent e753c50 · 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.

Trailers

  • Co-authored-by: thinkerou <thinkerou@gmail.com>

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
102 unmodified lines
103 SetMode(TestMode)104 })105 m, e := getMinVer(runtime.Version())106 if e == nil && m <= ginSupportMinGoVer {107 assert.Equal(t, "[GIN-debug] [WARNING] Now Gin requires Go 1.11 or later and Go 1.12 will be required soon.\n\n[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)107 assert.Equal(t, "[GIN-debug] [WARNING] Now Gin requires Go 1.12+.\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 }111}
55 unmodified lines
modified:debug.go+2 added-2 removed
10 unmodified lines
11 "strconv"12 "strings"13)1415const ginSupportMinGoVer = 1015const ginSupportMinGoVer = 121617// IsDebugging returns true if the framework is running in debug mode.18// Use SetMode(gin.ReleaseMode) to disable debug mode.19func IsDebugging() bool {
46 unmodified lines
66}6768func debugPrintWARNINGDefault() {69 if v, e := getMinVer(runtime.Version()); e == nil && v <= ginSupportMinGoVer {70 debugPrint(`[WARNING] Now Gin requires Go 1.11 or later and Go 1.12 will be required soon.70 debugPrint(`[WARNING] Now Gin requires Go 1.12+.7172`)73 }74 debugPrint(`[WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
29 unmodified lines