MCPcopy
hub / github.com/gin-gonic/gin / HandlerNames

Method HandlerNames

context.go:155–164  ·  view source on GitHub ↗

HandlerNames returns a list of all registered handlers for this context in descending order, following the semantics of HandlerName()

()

Source from the content-addressed store, hash-verified

153// HandlerNames returns a list of all registered handlers for this context in descending order,
154// following the semantics of HandlerName()
155func (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.
167func (c *Context) Handler() HandlerFunc {

Callers 1

TestContextHandlerNamesFunction · 0.80

Calls 1

nameOfFunctionFunction · 0.85

Tested by 1

TestContextHandlerNamesFunction · 0.64