Improved performance
This commit is contained in:
parent
a7d64037a7
commit
b04aadea09
7 changed files with 77 additions and 60 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue