HandlerNames returns a list of all registered handlers for this context in descending order, following the semantics of HandlerName()
()
| 153 | // HandlerNames returns a list of all registered handlers for this context in descending order, |
| 154 | // following the semantics of HandlerName() |
| 155 | func (c *Context) HandlerNames() []string { |
| 156 | hn := make([]string, 0, len(c.handlers)) |
| 157 | for _, val := range c.handlers { |
| 158 | if val == nil { |
| 159 | continue |
| 160 | } |
| 161 | hn = append(hn, nameOfFunction(val)) |
| 162 | } |
| 163 | return hn |
| 164 | } |
| 165 | |
| 166 | // Handler returns the main handler. |
| 167 | func (c *Context) Handler() HandlerFunc { |