3 ms·
Offtopic: Is there any decent Go boilerplate for building API?
by tuananh 11y ago
Offtopic: Is there any decent Go boilerplate for building API?
- mholt 11y agonet/http: https://golang.org/pkg/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.
- staticint 11y agoWhile 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.
- tuananh 11y agotrue. 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.
- dsies 11y agoAs 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 https://github.com/gorilla/mux , which complements net/http very well.