Reduced memory usage
This commit is contained in:
parent
ad033d4315
commit
7df818ffff
9 changed files with 95 additions and 84 deletions
|
@ -27,7 +27,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, []Parameter) {
|
||||
func (router *Router[T]) Lookup(method string, path string) (T, []keyValue) {
|
||||
if method[0] == 'G' {
|
||||
return router.get.Lookup(path)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue