I'm just getting started with Go, and to move past theory into practical zone I want to make a web app that I want eventually to deploy into production. What Go frameworks do people use (that are stable) for web apps in production?
I like how easy http://webgo.io/ seems to be but at the same time it looks like it hasn't been updated since forever.
Anyone using it? Anything else you would recommend?
评论:
mvpmvh:
daniels0xff:I think if you do a golang Reddit search for this very question, you will find 50+ prior threads all more or less repeating the same answer: standard library and gorilla toolkit. There are other answers, of course, but most suggest NOT using a framework at all. I have followed this approach as well.
mvpmvh:How do you deal with sessions, routing, cookies, etc. then? Do you just search for whatever modules are available for that and use that?
Ploobers:I personally look for individual modules, yes. Obviously you can do w/e ur most comfortable w. When I first started using go, I chose beego. It seemed to have everything I'd want, but in the end I decided to see what I could build w/out a complete framework, in favor of smaller toolsets and packages. It was a learning exercise that I don't regret.
karnd01:Check out http://goa.design/
daniels0xff:I'd say the most popular frameworks would be gin, echo and goji.. I have to agree with @mvpmvh, there are many libraries which allow you to create your own framework pretty quickly and easily just Google for the "gorilla" packages; if it helps I've created such a library that will get you going quickly as well, https://github.com/go-playground/lars
In the end try a bunch of them and see which would suite your needs best and go from there
sybrandy:I've just found https://go-macaron.com/ and looks really nice.
It seems it's using dependency injection. It this ok? I remember seeing some posts here that the GO community is king of against this? Should I look for something else?
jfurmankiewicz:I like httprouter. It does exactly what I need it to do amd keeps things simple.
I use gin and like it a lot. Simple, straightforward, good API. Fast.
Has middleware support if I need it.
