Go-Swagger Tricks. Standard HTTP handler
Hey, reader! Maybe you had tried go-swagger library so far. If yes, you may notice that sometimes it’s not so easy to use. And it may look a bit complicated to start using it.
In this number of small articles, I will share my experience on how to make go-swagger more friendly. Let’s start.
Handling requests in go-swagger By default, go-swagger generates a specific handler type for each endpoint in your Swagger scheme - that is, you will get a code-generated structure with all import parameters kindly parsed for you and a number of responders for each response type (with pre-generated structures as well).