2021 March
This document take insiration by folowing sources:
- https://developer.squareup.com/blog/a-comparison-of-go-web-frameworks/
- https://www.reddit.com/r/golang/comments/dojyv2/gorillamux_or_gingonicgin/
- https://www.ribice.ba/golang-web-frameworks/
- https://www.reddit.com/r/golang/comments/8uljbf/chi_or_echo_which_framework_would_you_recommend/
howtos:
- https://semaphoreci.com/community/tutorials/building-go-web-applications-and-microservices-using-gin ( gin)
- g
- Mux: https://github.com/gorilla/mux
- go chi: https://github.com/go-chi/chi
- go gin: https://github.com/gin-gonic/gin
- it isn't a framework
- its compatible with the stdlib so I could swap it out at any time.
- zero external vendor dependencie
- chi is built on the new context package introduced in Go 1.7 to handle signaling, cancelation and request-scoped values across a handler chain.
- unidiomatic golang
- not compatible with stdlib
- Gin breaks the standard handler signature, and its Context is inexplicably incompatible with context.Context
- it is a framework
- performance
regarding session handling:
https://github.com/gorilla/sessions
the rationale behind
chi
andmux
is that they are "pluggable" web toolkit, so if we choose one of those routers, for other components we can pick up or plug others, whereas go gin it is a framework within it all logic, afaik I can tell.see https://www.gorillatoolkit.org/