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
if the only pro for "go gin" is performance then we shouldn't use it. from my limited experience with gin I find the session and CSRF handling pretty minimal. if other options have better implementations we should consider that.