HandlerName returns string name for given function.
(h HandlerFunc)
| 97 | |
| 98 | // HandlerName returns string name for given function. |
| 99 | func HandlerName(h HandlerFunc) string { |
| 100 | t := reflect.ValueOf(h).Type() |
| 101 | if t.Kind() == reflect.Func { |
| 102 | return runtime.FuncForPC(reflect.ValueOf(h).Pointer()).Name() |
| 103 | } |
| 104 | return t.String() |
| 105 | } |
| 106 | |
| 107 | // Clone creates copy of Routes |
| 108 | func (r Routes) Clone() Routes { |
searching dependent graphs…