SIGN IN SIGN UP
gin-gonic / gin UNCLAIMED

Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.

0 0 86 Go

ci(sec): improve type safety and server organization in HTTP middleware (#4437)

- 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

Signed-off-by: appleboy <appleboy.tw@gmail.com>
B
Bo-Yi Wu committed
93ff771e6dbf10e432864b30f3719ac5c84a4d4a
Parent: 58135f0
Committed by GitHub <noreply@github.com> on 11/15/2025, 3:03:32 PM