Top 23 Go Web Framework Projects
-
Gin
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
We're going to use gin for our web application. Gin is a lightweight web framework, similar to Sinatra for Ruby, express.js for Javascript, or Flask for Python.
-
Iris
The fastest HTTP/2 Go Web Framework. AWS Lambda, gRPC, MVC, Unique Router, Websockets, Sessions, Test suite, Dependency Injection and more. A true successor of expressjs and laravel | 谢谢 https://github.com/kataras/iris/issues/1329 |
Pug
-
go-kit
A standard library for microservices.
go-kit/kit (Go): A standard library for microservices.
-
Echo
High performance, minimalist Go web framework
Latest mention: Any way of reducing the verbosity at the web development with Go? | reddit.com/r/golang | 2021-01-11If you're looking to write just web services then you might find Echo https://github.com/labstack/echo a good fit. Here is how I used echo in a template project https://github.com/iambenkay/nairacheck
-
mux
A powerful HTTP router and URL matcher for building Go web servers with 🦍
Latest mention: When to use Golang over Python for web app backend? | reddit.com/r/golang | 2021-01-24gorilla/mux - Routing
-
httprouter
A high performance HTTP request router that scales well
httprouter is a fast router for Go that implements a lot of features of which a few are Path auto-correction, Zero Garbage, Best Performance.
-
Revel
A high productivity, full-stack web framework for the Go language.
Latest mention: Any way of reducing the verbosity at the web development with Go? | reddit.com/r/golang | 2021-01-11Of course there are options that make your work a lot less frustrating. From your choice of tools, you're probably trying to setup your architecture yourself but if that's not a necessity for you, you can tap into community frameworks that have basic features wired. There is Revel https://github.com/revel/revel A Rails alternative in Go.
-
Fiber
⚡️ Express inspired web framework written in Go
I will recommend fiber https://github.com/gofiber/fiber
-
chi
lightweight, idiomatic and composable router for building Go HTTP services
The issue about versioning is precisely to come back to v1.5 and not accept to follow the Go way for major versions https://github.com/go-chi/chi/issues/561
-
negroni
Idiomatic HTTP Middleware for Golang
-
Buffalo
Rapid Web Development w/ Go
-
GoSwagger
Swagger 2.0 implementation for go
-
gqlgen
go generate based graphql server library
99designs/gqlgen
-
goa
Design-based APIs and microservices in Go
- similar to grpc gateway you just need to conform to the generated code’s service interface.
I believe it supports, http, websocket and grpc.
-
go-socket.io
socket.io library for golang, a realtime application framework.
-
web.go
The easiest way to create web applications with Go
-
go-json-rest
A quick and easy way to setup a RESTful JSON API
-
Macaron
Package macaron is a high productive and modular web framework in Go.
-
alice
Painless middleware chaining for Go
Latest mention: Web Development in Go: Middleware, Templating, Databases & Beyond | dev.to | 2021-01-27You can use a library like Alice to transform the above construct to a more readable form such as:
-
utron
A lightweight MVC framework for Go(Golang)
-
melody
:notes: Minimalist websocket framework for Go
-
Tollbooth
Simple middleware to rate-limit HTTP requests.
-
CORS
Go net/http configurable handler to handle CORS requests
Nice demo. A few things you could add to make this more realistic to something that gets shipped:
-CORS support. Deploy this to a non-local domain and try to reach it from a web browser and it will fail. I like https://github.com/rs/cors. I had rolled my own but then moved to that library.
- input validation. I like go-playground/validator.
The other big issue is the locking by hand around the task store. In reality usually there would be a database to handle concurrent read/writes. I use SQLite in production. I know this is just a demo and you want to use just stdlib, but serializing all data access is sort of unacceptable as a solution in a concurrent language like Go. When I'm not handling concurrency with SQLite I like to implement The actor pattern, having a persistent goroutine listen and respond to "taskstore" requests via channels.
Index
What are some of the best open-source Web Framework projects in Go? This list will help you:
Project | Stars | |
---|---|---|
1 | Gin | 45,143 |
2 | Iris | 19,930 |
3 | go-kit | 19,214 |
4 | Echo | 18,991 |
5 | mux | 13,586 |
6 | httprouter | 12,273 |
7 | Revel | 12,115 |
8 | Fiber | 11,264 |
9 | chi | 8,756 |
10 | negroni | 6,887 |
11 | Buffalo | 6,046 |
12 | GoSwagger | 6,031 |
13 | gqlgen | 5,459 |
14 | goa | 4,108 |
15 | go-socket.io | 3,900 |
16 | web.go | 3,508 |
17 | go-json-rest | 3,452 |
18 | Macaron | 3,118 |
19 | alice | 2,191 |
20 | utron | 2,180 |
21 | melody | 2,045 |
22 | Tollbooth | 1,842 |
23 | CORS | 1,703 |