Navigate:
~$GIN0.0%

Gin: HTTP web framework for Go

Fast HTTP router with JSON binding and middleware support.

LIVE RANKINGS • 06:52 AM • STEADY
OVERALL
#182
48
BACKEND & APIS
#7
3
30 DAY RANKING TREND
ovr#182
·Backe#7
STARS
87.6K
FORKS
8.5K
DOWNLOADS
33
7D STARS
+24
7D FORKS
+4
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.


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

Feature release adding HTTP/3 support, custom JSON codecs, and new binding helpers; no breaking changes noted.

  • Enable HTTP/3 with quic-go by calling the new HTTP/3 server method; requires quic-go dependency.
  • Use custom JSON codecs at runtime or bind plain text with BindPlain; form binding now supports default values and arrays.
vv1.10.1

Refactors HTTPS security configuration and code organization with no documented breaking changes or new requirements.

  • Review HTTPS settings as internal security handling was strengthened, though specifics are not detailed in release notes.
  • Release notes do not specify API changes, deprecations, or migration steps required for this patch.
vv1.10.0

Feature release adding proxy auth, custom binding unmarshalers, and option funcs; upgrades golang.org/x/crypto to 0.17.0 and protobuf for CVE-2024-24786.

  • Use `BasicAuthForProxy` for proxy-server authentication or `OptionFunc` with `With` to configure engine instances functionally.
  • Implement custom `BindUnmarshaler` interface to override default binding behavior for specific types in request parsing.

See how people are using gin

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers