refactor: extract magic numbers to named constants for mnd lint compliance

This commit is contained in:
ryan
2026-06-09 13:44:29 +08:00
parent b05d26c9c6
commit e06f76436e
24 changed files with 650 additions and 440 deletions
+1 -1
View File
@@ -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()))
}