mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-05 15:26:36 +08:00
refactor: extract magic numbers to named constants for mnd lint compliance
This commit is contained in:
@@ -73,7 +73,7 @@ func loggerMiddleware() gin.HandlerFunc {
|
||||
}
|
||||
|
||||
// 设置 Span 状态
|
||||
if c.Writer.Status() >= 400 {
|
||||
if c.Writer.Status() >= http.StatusBadRequest {
|
||||
span := trace.SpanFromContext(ctx)
|
||||
span.SetStatus(codes.Error, strconv.Itoa(c.Writer.Status()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user