mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
add Pool and Handlers method helpers on the new ContextWrapper
This commit is contained in:
@@ -53,9 +53,9 @@ func (f *Func) buildMeta() {
|
||||
case Handler:
|
||||
f.Meta = &FuncMeta{Handler: fn}
|
||||
return
|
||||
case func(*Context):
|
||||
f.Meta = &FuncMeta{Handler: fn}
|
||||
return
|
||||
// case func(*Context):
|
||||
// f.Meta = &FuncMeta{Handler: fn}
|
||||
// return
|
||||
case func(*Context) error:
|
||||
f.Meta = &FuncMeta{HandlerWithErr: fn}
|
||||
return
|
||||
|
||||
@@ -104,12 +104,12 @@ func (expr *NameExpr) MatchString(s string) bool {
|
||||
//
|
||||
// If Handler panics, the server (the caller of Handler) assumes that the effect of the panic was isolated to the active request.
|
||||
// It recovers the panic, logs a stack trace to the server error log, and hangs up the connection.
|
||||
type Handler func(*Context)
|
||||
type Handler = func(*Context)
|
||||
|
||||
// Handlers is just a type of slice of []Handler.
|
||||
//
|
||||
// See `Handler` for more.
|
||||
type Handlers []Handler
|
||||
type Handlers = []Handler
|
||||
|
||||
func valueOf(v interface{}) reflect.Value {
|
||||
if val, ok := v.(reflect.Value); ok {
|
||||
|
||||
Reference in New Issue
Block a user