You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix all 50 golangci-lint issues across multiple categories
ERRCHECK FIXES (36 issues):
- Fixed all unchecked error returns in test files by adding _ = prefix
- Fixed unchecked cache.Set/Delete/Close calls with explicit error ignoring
- Fixed unchecked cache.Set calls in wrap.go for error caching
GOCONST FIXES (3 issues):
- examples/advanced/main.go: Made "unknown" a constant
- pkg/obcache/wrap_extra_test.go: Made "result" a constant
GOSEC FIXES (2 issues):
- examples/metrics/main.go: Added HTTP server timeouts to prevent G114
- pkg/obcache/hooks_test.go: Fixed integer overflow in G115 by explicit casting
STATICCHECK FIXES (9 issues):
- Fixed ST1005: Made error string lowercase in cache.go
- Fixed SA1029: Used custom context key types instead of string keys
- Fixed SA9003: Added proper error handling in logging examples
- Fixed SA5011: Added nil check and return to prevent dereference
All test files now properly handle errors with explicit ignoring where appropriate.
All example code follows Go best practices for context keys and error handling.
0 commit comments