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

Method Last

gin.go:60–65  ·  view source on GitHub ↗

Last returns the last handler in the chain. i.e. the last handler is the main one.

()

Source from the content-addressed store, hash-verified

58
59// Last returns the last handler in the chain. i.e. the last handler is the main one.
60func (c HandlersChain) Last() HandlerFunc {
61 if length := len(c); length > 0 {
62 return c[length-1]
63 }
64 return nil
65}
66
67// RouteInfo represents a request route's specification which contains method and path and its handler.
68type RouteInfo struct {

Callers 1

iterateFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected