Ask HN: Which Go web framework should i use in 2016?

3 points by Mooty ↗ HN
Hi HN !

I am currently searching for an alternative to PHP with Go but I cannot find any advice on which go framework could be as great as Symfony or Laravel. Can anyone help me find the next big thing ?

Matt Loye

6 comments

[ 2.8 ms ] story [ 27.4 ms ] thread
If you are looking for a "framework" in the php/rails mode go is likely not a great fit.

The best I can point to would be Gorilla.

First question I would ask is do you really need a web framework? With Go, the way language is built or designed - you don't need crazy frameworks. Having said that I do use gorilla package a lot to re-use some of the common middlewares and packages which wouldn't make sense to re-write. But, for API endpoints and all that I am directly using Go.
You don't need crazy frameworks in any language. However I think about the things different frameworks give me. Generation of database migrations and other standard elements, an ORM and/or query DSL so my SQL code can be more DRY, a community with a shared code base so that I don't have to rediscover every solution or rewrite everything for my particular use case, and additional domain knowledge that is transferable to other projects/companies so that I can be immediately productive.

I mean I like Go, and I understand that layer of abstraction can be frustrating, especially in a typed language, but that layer of abstraction can also be incredibly useful.

Matt, there a tons of frameworks at different levels.

There are ones like Beego (https://beego.me/docs/intro/) that others have mentioned that have all the batteries included.

Others like Gin (https://github.com/gin-gonic/gin) that have a lot built in and offer an stable API and good performance.

Gorilla (http://www.gorillatoolkit.org/) offers pieces you tie together but are at a lower level of abstraction.

If you use the standard library, you have to build a little bit more, but you do not have to deal with dependencies or changes in 3rd party APIs.