chore(lint): re-enable staticcheck and unused
golangci-lint v2.15.0 ships a honnef.co/go/tools that analyzes the Go 1.27 standard library without panicking. Fix what they found: dead helpers, an unused constant, error strings starting with a product name, the usage error, and two negations simplified by De Morgan. Closes #43 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
1ad68e2e87
commit
d58e3e2653
14 files changed
+20
-25
No files matched your search
@@ -177,7 +177,7 @@ func (s *Server) audit() gin.HandlerFunc {
|
||||
|
||||
action := auditActions[c.Request.Method+" "+c.FullPath()]
|
||||
status := c.Writer.Status()
|
||||
if action == "" || c.GetBool(ctxAuditSkip) || (status >= 400 && !(auditFailures[action] && status < 500)) {
|
||||
if action == "" || c.GetBool(ctxAuditSkip) || (status >= 400 && (!auditFailures[action] || status >= 500)) {
|
||||
return
|
||||
}
|
||||
if status >= 400 {
|
||||
|
||||
@@ -68,9 +68,6 @@ func (t groupTree) resources(group *uuid.UUID) []authz.Resource {
|
||||
return out
|
||||
}
|
||||
|
||||
// depth returns how many ancestors a group has.
|
||||
func (t groupTree) depth(id uuid.UUID) int { return len(t.resources(&id)) - 1 }
|
||||
|
||||
// walk visits groups depth-first in name order.
|
||||
func (t groupTree) walk(fn func(g store.MonitorGroup, depth int)) {
|
||||
var visit func(ids []uuid.UUID, depth int)
|
||||
|
||||
Reference in new issue
Block a user