mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-18 06:42:10 +08:00
optimize code and reduce code cyclomatic complexity
This commit is contained in:
parent
328d0b8076
commit
ecacaf78c8
4
debug.go
4
debug.go
@ -95,9 +95,7 @@ at initialization. ie. before any route is registered or the router is listening
|
|||||||
}
|
}
|
||||||
|
|
||||||
func debugPrintError(err error) {
|
func debugPrintError(err error) {
|
||||||
if err != nil {
|
if err != nil && IsDebugging() {
|
||||||
if IsDebugging() {
|
|
||||||
fmt.Fprintf(DefaultErrorWriter, "[GIN-debug] [ERROR] %v\n", err)
|
fmt.Fprintf(DefaultErrorWriter, "[GIN-debug] [ERROR] %v\n", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user