最好的6个Golang Web框架

 

Go 是一个快速增长的开源编程语言,用于构建简单、快速和可靠的软件。点这里看有哪些大公司在使用Go语言来构建他们的服务。

本文提供了所有必要的信息,以帮助开发人员了解使用Go语言开发Web应用程序的最佳选项。。

本文包含了最详细的框架比较,通过尽可能多的角度(人气,社区支持,内置功能等)来比较最知名的几个Web 框架。

Gin: 一个Go语言写的HTTP Web框架。它提供了Martini风格的API并有更好的性能。 
https://github.com/gin-gonic/gin 
https://gin-gonic.com/

Beego: 一个Go语言下开源的,高性能Web框架 
https://github.com/astaxie/beego 
https://beego.me

Echo: 一个高性能,极简的Web框架 
https://github.com/labstack/echo 
https://echo.labstack.com

Iris: 目前发展最快的Go Web框架。提供完整的MVC功能并且面向未来。 
https://github.com/kataras/iris 
https://iris-go.com

Buffalo: 一个Go语言下快速Web开发框架 
https://github.com/gobuffalo/buffalo 
https://gobuffalo.io

Revel: 一个高生产率,全栈Go语言的Web框架。 
https://github.com/revel/revel 
https://revel.github.io

 

https://github.com/speedwheel/awesome-go-web-frameworks/blob/master/README.md

 

人气指数

按人气排序(star收藏数)

 

NameStarsForksIssues OpenIssues ClosedBirth YearLatest UpdateAuthor
Gin 24,181 2,835 129 919 2014 2019-02-04 @manucorporat
Beego 18,812 3,884 545 1,806 2012 2019-02-04 @astaxie
Iris 13,565 1,406 19 621 2016 2019-01-16 @kataras
Echo 12,861 1,141 14 779 2015 2019-02-07 @vishr
Revel 10,723 1,302 58 806 2011 2018-10-30 @revel
Buffalo 3,935 320 51 599 2014 2019-01-31 @markbates

学习曲线

Great job by astaxie and kataras here, hopfully and the other frameworks will catch up with more examples, at least for me, if I switch to a new framework, that's the most resourceful place to quickly grasp as much information as possible. An example it's like 1000 words.

核心功能

按功能由多到少排序

 

NameIrisBeegoRevelEchoGinBuffalo
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 ★★★★★ ★★★ ★★ ★★★★★ ★★★★★ ★★★
The most known "Web frameworks" in Go are not really frameworks, meaning that:
Echo, Gin and Buffalo are not really (fully featured) web frameworks
but the majority of Go community thinks that they are.
Therefore they think that they are comparable with Iris, Beego or Revel,
because of that we have the obligation to include them into this list as well.

All of the above frameworks, except Beego and Revel, can adapt any middleware
that was created for net/http, some of those can do this with ease and others
with some hacking [even the pain is a choice here].

 

 

https://golangtc.com/t/56a38761b09ecc083100010c

 

 

 

 

https://goframe.org/

 

posted on   youhui  阅读(2043)  评论(0编辑  收藏  举报

编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 一文读懂知识蒸馏
· 终于写完轮子一部分:tcp代理 了,记录一下
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示