Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does Go have a defacto web framework?


> Does Go have a defacto web framework?

There's a few, but I think it's still too early to really call out a "defacto" framework.

Revel, as mentioned, is a popular "full stack" framework, but it can be pretty heavy. web.go[1] gets a lot of use (it sits at a Flask/Sinatra level), and beego[5] looks good but it's also totally acceptable to plug a few libraries together without much work on top.

For example, I'm using:

- mux, sessions, schema & context from Gorilla[2]

- go.auth for social sign-in [3]

- the RethinkDB driver [4]

... and that's about it. Write your routes with mux, set up your handlers with auth/sessions/schema, and generate your models & queries with whatever DB you want. The standard html/template library is good enough (and there's a Mustache library if you need it), and the standard http library covers everything in between.

TL;DR: If you enjoy writing Flask/Sinatra apps, you'll enjoy writing Go web apps. If you're coming from a full-stack framework (like me), there is definitely a learning curve, but I feel that Go's documentation and std. lib flatten that out a little.

[1]: https://github.com/hoisie/web

[2]: http://www.gorillatoolkit.org/

[3]: https://github.com/bradrydzewski/go.auth

[4]: https://github.com/christopherhesse/rethinkgo

[5]: https://github.com/astaxie/beego


Spot on. I suggest to newcomers that they save od your coment. It is good intro to the Go biome.


When you said Revel is "heavy" - did you mean slow, uses lots of memory/CPU/other or just has lots of custom bits to learn/use?


> When you said Revel is "heavy" [...]

It provides nearly everything, likely including things you don't even need. It's likely that a lot of the parts included won't be needed by a "typical" web application, and if you want to do things another way you'll need to spend some time switching those components out. To be fair though, having "everything" can be a big plus, especially when you don't know what you might need (or have the time to glue things together).

I don't know how tightly coupled the components are in Revel, but if it's like Django, some things are easy to add/remove (middleware), and others are much harder to work around (ORM, views, etc.).


web.go is influenced from web.py.


Many of the people in the Go community are anti-framework and pro-library. (inversion of control; a library is provided code called by your code, versus a Framework provided code that calls your code).

That being said, right now the dominate Go web library is "net/http" from the Go standard library, supplemented by Gorilla (as needed): http://www.gorillatoolkit.org/

If what you are looking for is really a Go web framework however, there are a few in development including Revel: http://robfig.github.io/revel/


I've written a small production web project and several medium-sized personal projects in Go, and have not yet found a need for a web framework outside of net/http. I've used several libraries that work as nested/stacked handlers under net/http; Go's structure embedding is a natural fit for that.


I've seen Gorilla (http://www.gorillatoolkit.org/) used quite a bit. The standard library is also good enough for small and quick things.


I would love to know about this as well. Basically a basic rundown of how Go works in relation to running various web facing stuff (a simple API for example).


See http://golang.org/doc/articles/wiki/ for a starting point.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: