finds.dev

xinliangnote/go-gin-api

基于 Gin 进行模块化设计的 API 框架,封装了常用功能,使用简单,致力于进行快速的业务研发。比如,支持 cors 跨域、jwt 签名验证、zap 日志收集、panic 异常捕获、trace 链路追踪、prometheus 监控指标、swagger 文档生成、viper 配置文件解析、gorm 数据库组件、gormgen 代码生成工具、graphql 查询语言、errno 统一定义错误码、gRPC 的使用、cron 定时任务 等等。

View on GitHubHomepage ↗

★ 5,970GoMITupdated Dec 2023

// the take

A Gin-based API framework starter for Go that bundles a large number of common backend concerns — JWT, CORS, rate limiting, Prometheus, Swagger, cron, GraphQL, WebSocket — into a single opinionated project template. It's aimed at Go developers who want to skip the initial wiring phase and get to business logic faster, particularly teams used to the Chinese backend ecosystem (docs are primarily in Chinese, templates target Light Year Admin).

The component selection is sensible and covers what most internal APIs actually need — zap for structured logging, viper for config, gorm for the ORM, go-redis, Prometheus metrics, pprof. The cron scheduler has a web UI for configuration, which saves building admin tooling for a common pain point. There's a code generator for CRUD handlers and GORM models, which is genuinely useful when you're standing up a new resource. The project layout (cmd, internal, configs, deployments) follows established Go conventions rather than inventing something new.

Last commit was December 2023 and there's no indication of active maintenance — dependencies are likely stale and there are known vulnerabilities in older versions of several bundled packages. The documentation is almost entirely in Chinese, making it a rough starting point for non-Chinese teams despite the English README stub. The project conflates 'framework' and 'application' — it ships with a full admin panel, MySQL schema creation SQL, and a web installer, so you're forking an application rather than importing a library, which makes upgrades essentially impossible. GraphQL support appears to be a demo-level integration (single user schema) rather than something production-ready.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
5,970
Forks
1,125
Language
Go
License
MIT
Last commit
23 Dec 2023

// nearby

If go-gin-api isn't quite it.

All repos →