Closed Allendar closed 7 years ago
Maybe it would be prettier to allow the native constants?
app.Many("/login", []int{http.MethodGet, http.MethodPost}, routeLogin)
@godofdream API change? V8? @Allendar Thanks for your PR, I like it. I think, the native constants are better here. But on the other hand... the "shortnames" would also be nice... let @godofdream give a feedback.
@Dexus We did not break compatibility yet, so still API V7. @Allendar Thanks for your PR. Nice work! The []string{"GET", "POST"} Method is easier for beginners (I prefer this solution). The speed improvement by using []int{http.MethodGet, http.MethodPost} is only feelable if someone adds routes all the time and not only during initialization. If we want to go with []int{http.MethodGet, http.MethodPost} we should change the whole api for all route operations, which seems not useful for now.
Use
instead of