Hey everyone, Any suggestions on which go libraries to use for building a rest service ? I'm looking for something that's to the point and that helps me focus on my business logic. I've played a bit with Goa but looking for other alternatives Thanks!
评论:
deusmetallum:
kpurdon:Labstack Echo is all right.
Kraigius:You really will only need something like https://github.com/go-chi/chi (or gorilla/mux) to give you just enough sugar on top of net/http. I bet you'll spend more time with a "framework" like buffalo/gin/echo/goa/gokit/... learning and getting it setup than you will just with a router and net/http.
zpatrick319:I've been using goa for a year now and yeah it takes some getting used to especially since it have its own language to generate the code. However, it pretty much handle all responses, params, error checking...90% of the stuff that I care about.
It also generate the swagger file which my end users can use to automatically generate a client in the language of their choices.
However, it's a bit of a pain to get any contributors since they have no clue how to use it and it's also harder to set up. I'll be looking for a simpler framework for my next major release.
tmornini:I wrote https://github.com/zpatrick/fireball to help me quickly write rest services for work/personal use. I usually copy the api example and go from there.
Standard lib and httprouter fit the bill for our project.
