Re:Building Web Apps in Go
by tuananh on Sunday March 27, 2016 @10:57PM
(#11372476)
Offtopic: Is there any decent Go boilerplate for building API?
[ Parent
| on HN ]
net/http: https://golang.org/pkg/net/http
I'm not trolling. It seriously is easy enough to crank out a basic web app in less than a hundred lines of code that runs very well with just the standard library.
While I completely agree that the standard library is all you need in quite a lot of cases, the parent seems to be asking from more of a "how do I structure my application" perspective. A tool that generates the boilerplate necessary to use the standard library effectively in a complete application. Not just http handlers, but think of the persistence layer, for example. The standard library does not assist much with the engineering aspect of the job.
true. I have problem when it come to structuring the application so i want a boilerplate so that I can see what everybody has been doing.
As someone above already replied - net/http is enough to build something that's good enough.
In addition, there is also: https://github.com/gorilla/mux , which complements net/http very well.