3 ms·
While I'd agree that net/http is very capable, it still comes with a variety of gotchas when doing timeouts, logging, routing, etc. I think gin[1] is a good bet
by anschwa 8y ago
While I'd agree that net/http is very capable, it still comes with a variety of gotchas when doing timeouts, logging, routing, etc. I think gin[1] is a good bet for jumping into building something without having to dive into doing a lot of http.Server research.
[1] https://github.com/gin-gonic/gin https://github.com/gin-gonic/gin
- qrv3w 8y agoAlso love Gin - I've used this for maybe a dozen different projects. Sometimes I use the stdlib but when I do I usually end up trying to make an API like Gin. Gin just makes things so much faster to write good looking and well-performing code with their contexts and simple API. My favorite thing about Gin: its README has 90% of what you need to know, with refined examples. I love when README's are so expressive, especially when Gitlab/Github/Bitbucket make the README the front page. Also, the README comes with the code when you clone so you can easily refer to it offline (I realize you could generate Godocs but I always forget the command to do this, and Godocs don't often have nice examples). I'll also point out that Gin has an excellent collection of contributed middleware [1]. [1]: https://github.com/gin-gonic/contrib https://github.com/gin-gonic/contrib