Gin: HTTP web framework for Go
Fast HTTP router with JSON binding and middleware support.
Learn more about Gin
Gin is a web framework for Go that handles HTTP request routing and response rendering. It implements a middleware system similar to Express.js and uses httprouter as its underlying router to minimize memory allocations during request processing. The framework includes features like automatic JSON/XML binding, template rendering, and panic recovery middleware. Common applications include REST API development, microservice construction, and web application backends where concurrent request handling is required.
Zero-Allocation Routing
Uses httprouter to perform request routing without heap allocations, reducing garbage collection pressure. Delivers lower memory overhead and consistent performance under high concurrent load compared to frameworks that allocate per request.
Middleware and Grouping
Compose cross-cutting concerns like logging and authentication through a chainable middleware system. Route grouping organizes related endpoints and applies common middleware to subsets, reducing code duplication.
Built-in Request Handling
Automatic JSON and XML binding with validation eliminates manual parsing boilerplate. Includes template rendering for HTML responses and recovery middleware that catches panics to prevent server crashes.
r := gin.Default()
r.GET("/users/:id", func(c *gin.Context) {
id := c.Param("id")
c.JSON(200, gin.H{
"user_id": id,
"name": "John Doe",
})
})
r.Run(":8080")This release adds new binding features including BindPlain, timestamp support, native Go types, and collection default values.
- –feat: add BindPlain
- –feat: add support for unixMilli and unixMicro
- –feat: GetXxx added support for more go native types
- –feat: add SetCookieData
- –feat: Support default values for collections in form binding
This release strengthens HTTPS security and improves code organization.
- –refactor: strengthen HTTPS security and improve code organization
This release adds proxy-server authentication, custom binding features, and engine configuration improvements.
- –feat: add proxy-server authentication
- –feat: ShouldBindBodyWith shortcut and change doc
- –feat: Support custom BindUnmarshaler for binding
- –feat: support override default binding implement
- –feat: Added OptionFunc and With
Top in Backend & APIs
Related Repositories
Discover similar tools and frameworks used by developers
Cal.com
Open-source scheduling platform for calendar booking, self-hosted alternative to proprietary services.
chi
Composable Go HTTP router for web services with middleware chains and route groups.
Supabase
PostgreSQL backend with auto-generated APIs and real-time subscriptions.
Dapper
Lightweight ORM extending ADO.NET with simple query methods for .NET applications.
Celery
Asynchronous task queue with distributed worker execution.
Related Reading
Guides and comparisons from the Greptile content library
Greptile Ranks #1 on Martian's AI Code Review Benchmark
Greptile ranks #1 on Martian's independent online AI code review benchmark, leading all evaluated tools in F1 score and precision with near-leading recall.
AI Coding Tools: A 2026 Guide to Every Category
A 2026 guide to every category of AI coding tool: assistants, editors, code generators, code review, and testing tools.
Best CodeRabbit Alternatives for Smarter AI Code Reviews in 2026
7 powerful CodeRabbit alternatives ranked by real dev teams. Feature comparison, pricing analysis, and honest reviews to find your perfect AI code reviewer.
Best Code Review Tools in 2026
The best code review tools in 2026, compared on pricing, features, deployment options, and ideal use cases for teams of any size.