mirror of
https://github.com/gin-gonic/gin.git
synced 2026-11-26 05:03:38 +08:00
fix(recovery): drop unused colorStart assignment
wastedassign failed lint because colorStart was initialized then overwritten without being read.
This commit is contained in:
parent
2de0ab9604
commit
a83ed03c56
@ -70,11 +70,10 @@ func CustomRecoveryWithWriter(out io.Writer, handle RecoveryFunc) HandlerFunc {
|
||||
errors.Is(err, http.ErrAbortHandler)
|
||||
}
|
||||
if logger != nil {
|
||||
colorStart, colorReset := "", ""
|
||||
colorReset := ""
|
||||
if consoleColorEnabled(out) {
|
||||
colorStart = "\x1b[31m"
|
||||
colorReset = reset
|
||||
logger.SetPrefix("\n\n" + colorStart)
|
||||
logger.SetPrefix("\n\n\x1b[31m")
|
||||
} else {
|
||||
logger.SetPrefix("\n\n")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user