ci(lint): golangci-lint v2 入门禁并归零
CI / Backend (go vet + test) (push) Canceled after 0s
CI / Frontend (lint + build + test) (push) Canceled after 0s

- .golangci.yml:standard 集 - errcheck(存量 38 处裸忽略待专项),staticcheck 关纯风格/quickfix
- 清理 3 个无引用死函数;SanitizedJSON 不可达分支收敛为接口分支 + nil 指针防护(原死分支中的 nil 检查从未执行)
- CI backend job 增加 golangci-lint-action@v6
This commit is contained in:
opsx committed 2026-10-29 13:29:25 +08:00
1 parent a69142fbfe
commit c33ea9d0a8
5 files changed
+20 -58

No files matched your search

-12
View File
@@ -38,17 +38,5 @@ func Metrics() gin.HandlerFunc {
}
// statusClass 给日志/看板用的状态分类(保留工具函数)
func statusClass(code int) string {
switch {
case code < 300:
return "2xx"
case code < 400:
return "3xx"
case code < 500:
return "4xx"
default:
return "5xx"
}
}
var _ = strconv.Itoa