gin-gonic/gin

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

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 20 minutes ago
Added to GitGenius on February 5th, 2023
Created on June 16th, 2014
Open Issues & Pull Requests: 761 (+0)
Number of forks: 8,673
Total Stargazers: 89,112 (+0)
Total Subscribers: 1,359 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 39.7 days
Mean response time: 926.5 days
90th percentile: 2896.4 days
Tracked items: 413

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 99% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "type/proposal" is answered fastest, typically in about 21 hours, while "question" waits about 71 months. Only 5% of issues opened in the past year have been closed. Three people close 69% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 189
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 749 days
Stale 30+ days: 181
Stale 90+ days: 170

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • type/bug (27)
  • type/proposal (20)
  • question (16)
  • feature (7)
  • enhancement (4)
  • document (3)
  • help wanted (1)
  • security (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Gin is a high-performance HTTP web framework written in Go that provides a Martini-like API with significantly better performance, achieving speeds up to 40 times faster than Martini through its use of httprouter. The framework is specifically designed for building REST APIs, web applications, and microservices where speed and developer productivity are critical requirements.

The core architecture of Gin emphasizes performance efficiency through several key technical features. It implements a zero allocation router that achieves memory-efficient routing with no heap allocations, and includes built-in recovery middleware that prevents panics from crashing the server. The framework provides automatic JSON validation for request and response binding, route grouping capabilities to organize related endpoints and apply common middleware, and centralized error handling and logging. Additional rendering support includes JSON, XML, HTML templates, and other formats, while an extensible middleware system allows developers to add authentication, logging, CORS, and other cross-cutting concerns.

Gin's performance characteristics are documented through comprehensive benchmarks comparing it against other Go web frameworks. In GitHub API routing benchmarks, Gin achieves 43550 repetitions with 27364 nanoseconds per operation and zero heap allocations, positioning it competitively among high-performance frameworks. The framework requires Go version 1.25 or above and is distributed through Go's module system for straightforward installation and dependency management.

The ecosystem surrounding Gin is substantial, with official middleware collections available through gin-contrib and gin-gonic/contrib organizations, providing pre-built solutions for authentication including JWT and Basic Auth, CORS handling, rate limiting, compression, logging, metrics, tracing, static file serving, and template engines. Production deployments demonstrate Gin's reliability and scalability, powering applications including gorush for push notifications, fnproject for serverless computing, photoprism for AI-powered photo management, lura as an API gateway framework, picfit for real-time image processing, and dkron for distributed job scheduling.

The project maintains comprehensive documentation available in multiple languages including English, Simplified Chinese, Traditional Chinese, Japanese, Korean, Spanish, Turkish, Persian, Portuguese, Russian, and Indonesian. Official tutorials are available through Go.dev, and an examples repository provides ready-to-run demonstrations of REST API development, authentication, file operations, WebSocket connections, and template rendering.