"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "debug.go" between
gin-1.7.6.tar.gz and gin-1.7.7.tar.gz

About: Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API (with much better performance).

debug.go  (gin-1.7.6):debug.go  (gin-1.7.7)
skipping to change at line 15 skipping to change at line 15
package gin package gin
import ( import (
"fmt" "fmt"
"html/template" "html/template"
"runtime" "runtime"
"strconv" "strconv"
"strings" "strings"
) )
const ginSupportMinGoVer = 12 const ginSupportMinGoVer = 13
// IsDebugging returns true if the framework is running in debug mode. // IsDebugging returns true if the framework is running in debug mode.
// Use SetMode(gin.ReleaseMode) to disable debug mode. // Use SetMode(gin.ReleaseMode) to disable debug mode.
func IsDebugging() bool { func IsDebugging() bool {
return ginMode == debugCode return ginMode == debugCode
} }
// DebugPrintRouteFunc indicates debug log output format. // DebugPrintRouteFunc indicates debug log output format.
var DebugPrintRouteFunc func(httpMethod, absolutePath, handlerName string, nuHan dlers int) var DebugPrintRouteFunc func(httpMethod, absolutePath, handlerName string, nuHan dlers int)
skipping to change at line 70 skipping to change at line 70
first := strings.IndexByte(v, '.') first := strings.IndexByte(v, '.')
last := strings.LastIndexByte(v, '.') last := strings.LastIndexByte(v, '.')
if first == last { if first == last {
return strconv.ParseUint(v[first+1:], 10, 64) return strconv.ParseUint(v[first+1:], 10, 64)
} }
return strconv.ParseUint(v[first+1:last], 10, 64) return strconv.ParseUint(v[first+1:last], 10, 64)
} }
func debugPrintWARNINGDefault() { func debugPrintWARNINGDefault() {
if v, e := getMinVer(runtime.Version()); e == nil && v <= ginSupportMinGo Ver { if v, e := getMinVer(runtime.Version()); e == nil && v <= ginSupportMinGo Ver {
debugPrint(`[WARNING] Now Gin requires Go 1.12+. debugPrint(`[WARNING] Now Gin requires Go 1.13+.
`) `)
} }
debugPrint(`[WARNING] Creating an Engine instance with the Logger and Rec overy middleware already attached. debugPrint(`[WARNING] Creating an Engine instance with the Logger and Rec overy middleware already attached.
`) `)
} }
func debugPrintWARNINGNew() { func debugPrintWARNINGNew() {
debugPrint(`[WARNING] Running in "debug" mode. Switch to "release" mode i n production. debugPrint(`[WARNING] Running in "debug" mode. Switch to "release" mode i n production.
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)