Add allows you to specify multiple HTTP methods to register a route. The provided handlers are executed in order, starting with `handler` and then the variadic `handlers`.
(methods []string, handler any, handlers ...any)
| 116 | // Add allows you to specify multiple HTTP methods to register a route. |
| 117 | // The provided handlers are executed in order, starting with `handler` and then the variadic `handlers`. |
| 118 | func (r *Registering) Add(methods []string, handler any, handlers ...any) Register { |
| 119 | converted := collectHandlers("register", append([]any{handler}, handlers...)...) |
| 120 | r.app.register(methods, r.path, r.group, converted...) |
| 121 | return r |
| 122 | } |
| 123 | |
| 124 | // RouteChain returns a new Register instance whose route path takes |
| 125 | // the path in the current instance as its prefix. |