ci(sec): improve type safety and server organization in HTTP middleware (#4437)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
- Update linting configuration to exclude G115 gosec check instead of including specific checks - Add the safeInt8 helper for safer type conversions and use it to prevent int8 overflow in middleware handler execution - Group related constants and variables together for better organization in gin.go - Refactor HTTP server instantiation to use a dedicated http.Server object for all Run methods - Add the safeUint16 helper and use it to safely handle conversions in tree node functions to prevent uint16 overflow
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Signed-off-by: appleboy <appleboy.tw@gmail.com>
Diff stats
4 files+50 added−22 removed
- other:+50 added−22 removed