最好的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收藏数)

 

Name Stars Forks Issues Open Issues Closed Birth Year Latest Update Author
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

学习曲线

Name Examples Reference Real time support
Iris 92 https://github.com/kataras/iris/tree/master/_examples rocket chat
Beego 49 https://beego.me/docs  
Echo 20 https://echo.labstack.com/cookbook/hello-world  
Gin 15 https://github.com/gin-gonic/gin/tree/master/examples gitter
Revel 6 http://revel.github.io/examples/index.html gitter
Buffalo 6 https://gobuffalo.io/docs/installation slack

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.

核心功能

按功能由多到少排序

 

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 ★★★★★ ★★★ ★★ ★★★★★ ★★★★★ ★★★
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/

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM