mirror of
https://github.com/gin-gonic/gin.git
synced 2025-05-19 16:38:19 +08:00
optimize code and reduce code cyclomatic complexity (#2737)
* optimize code and reduce code cyclomatic complexity * optimize if-condtion Co-authored-by: thinkerou <thinkerou@gmail.com>
This commit is contained in:
6
debug.go
6
debug.go
@ -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() {
|
||||
fmt.Fprintf(DefaultErrorWriter, "[GIN-debug] [ERROR] %v\n", err)
|
||||
}
|
||||
if err != nil && IsDebugging() {
|
||||
fmt.Fprintf(DefaultErrorWriter, "[GIN-debug] [ERROR] %v\n", err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user