Improved performance

This commit is contained in:
Eduard Urbach 2024-03-14 23:26:59 +01:00
parent a7d64037a7
commit b04aadea09
Signed by: eduard
GPG key ID: 49226B848C78F6C8
7 changed files with 77 additions and 60 deletions

View file

@ -25,7 +25,7 @@ func (router *Router[T]) Add(method string, path string, handler T) {
}
// Lookup finds the handler and parameters for the given route.
func (router *Router[T]) Lookup(method string, path string) (T, []keyValue) {
func (router *Router[T]) Lookup(method string, path string) (T, []Parameter) {
if method[0] == 'G' {
return router.get.Lookup(path)
}