Navigate:
~$GIN0.2%

Gin: HTTP web framework for Go

Fast HTTP router with JSON binding and middleware support.

LIVE RANKINGS • 11:44 AM • STEADY
OVERALL
#207
90
BACKEND & APIS
#11
3
30 DAY RANKING TREND
ovr#207
·Backe#11
STARS
88.2K
FORKS
8.6K
7D STARS
+147
7D FORKS
+2
See Repo:
Share:

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.

Gin

1

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.

2

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.

3

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")

vv1.11.0

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
vv1.10.1

This release strengthens HTTPS security and improves code organization.

  • refactor: strengthen HTTPS security and improve code organization
vv1.10.0

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


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers