Skip to content

Use http.MethodXXX constants instead of string literals #659

@corani

Description

@corani

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions