oapi-codegen
oapi-codegen copied to clipboard
Use `http.MethodXXX` constants instead of string literals
I found this in the gorilla-server generator, not sure if it's also the case for other server generators.
When setting the Methods for the HandleFunc string literals are used (e.g. "GET") rather than the constants defined in the http package (e.g. http.MethodGet). This is a very minor issue, but if constants exist it's good practice to use them :)