…lines 1–8 unchanged (8 lines)
9 "html/template"
10 "runtime"
11 "strconv"
12 "strings"
13)
14
15const ginSupportMinGoVer = 14
16
17// IsDebugging returns true if the framework is running in debug mode.
18// Use SetMode(gin.ReleaseMode) to disable debug mode.
19func IsDebugging() bool {
20 return ginMode == debugCode
21}
…lines 22–62 unchanged (41 lines)
63 return strconv.ParseUint(v[first+1:], 10, 64)
64 }
65 return strconv.ParseUint(v[first+1:last], 10, 64)
66}
67
68func debugPrintWARNINGDefault() {
69 if v, e := getMinVer(runtime.Version()); e == nil && v <= ginSupportMinGoVer {
70 debugPrint(`[WARNING] Now Gin requires Go 1.15+.
71
72`)
73 }
74 debugPrint(`[WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
75
…lines 76–102 unchanged (27 lines)