optimize code and reduce code cyclomatic complexity

This commit is contained in:
tylitianrui 2021-05-25 12:52:58 +08:00
parent 328d0b8076
commit ecacaf78c8

View File

@ -95,9 +95,7 @@ at initialization. ie. before any route is registered or the router is listening
}
func debugPrintError(err error) {
if err != nil {
if IsDebugging() {
if err != nil && IsDebugging() {
fmt.Fprintf(DefaultErrorWriter, "[GIN-debug] [ERROR] %v\n", err)
}
}
}