mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-19 15:57:48 +08:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
739b4f8975
2
gin.go
2
gin.go
@ -30,7 +30,7 @@ type HandlerFunc func(*Context)
|
|||||||
// HandlersChain defines a HandlerFunc array.
|
// HandlersChain defines a HandlerFunc array.
|
||||||
type HandlersChain []HandlerFunc
|
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 {
|
func (c HandlersChain) Last() HandlerFunc {
|
||||||
if length := len(c); length > 0 {
|
if length := len(c); length > 0 {
|
||||||
return c[length-1]
|
return c[length-1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user