forked from mirror/gin
Update gin.go (#2110)
This commit is contained in:
parent
393a63f3b0
commit
517eacb4f9
2
gin.go
2
gin.go
|
@ -30,7 +30,7 @@ type HandlerFunc func(*Context)
|
|||
// HandlersChain defines a HandlerFunc array.
|
||||
type HandlersChain []HandlerFunc
|
||||
|
||||
// Last returns the last handler in the chain. ie. the last handler is the main own.
|
||||
// Last returns the last handler in the chain. ie. the last handler is the main one.
|
||||
func (c HandlersChain) Last() HandlerFunc {
|
||||
if length := len(c); length > 0 {
|
||||
return c[length-1]
|
||||
|
|
Loading…
Reference in New Issue