Golang的web框架对比


| 阅读 |,阅读约 1 分钟
| 复制链接:

Overview

Golang的web框架对比

Golang中的restful框架对比:更新时间:2020-09-15

名称 | star数 | fork数 | 最新代码提交时间| 优点 | 缺点 | 适用场景

  • | - | - | - | - | - | - | gin | 41.6k | 4.8k | 23小时前 | 快速灵活,高性能| beego | 24.9k | 5k | 14天前 | 国内名气挺大,完善的中文文档,适合小白入门 | 架构比较老,八大模块全部使用时很臃肿 | 中小型项目 iris | 19k | 2.1k | 5小时前 | 功能齐全 || 大型项目 echo | 18.1k | 1.6k | 10小时前| 快速灵活,高性能 | revel | 11.9k | 1.4k | 2个月前||性能低 Buffaio | 5.8k |458 | 8天前 go-restful | 3.9k | 585 | 15天前 | 可定制程度高 | | k8s在使用

核心功能对比

参考地址

Sorted by the most to less featured

Name Iris Beego Revel Echo Gin Buffalo
Router: Named Path Parameters & Wildcard* -
Router: Regex* -
Router: Grouping* -
Router: All the above Mixed Without Conflict*
Router: Custom HTTP Errors*
100% compatible with net/http*
Middleware ecosystem*
Sinatra-like API*
Server: Automatic HTTPS*
Server: Gracefully Shutdown*
Server: Multi Listeners*
Full HTTP/2* standard standard
Subdomains* secondary secondary secondary secondary secondary
Sessions* secondary
Websockets*
View (aka Templates) Embedded Into App*
View Engine: STD*
View Engine: Pug*
View Engine: Django*
View Engine: Handlebars*
View Engine: Amber*
Renderer: Markdown, JSON, JSONP, XML…*
MVC* - generator
Caching*
File Server*
File Server: Embedded Into App*
Response can be Modified Many times through lifecycle before sent*
Gzip* middleware middleware middleware
Testing Framework*
Typescript Transpiler*
Online Editor*
Logging System* - -
Maintenance & Auto-Updates*
Performance ★★★★★ ★★★ ★★ ★★★★★ ★★★★★ ★★★