mirror of
https://github.com/gin-gonic/gin.git
synced 2025-08-24 16:01:46 +08:00
Adds comments
This commit is contained in:
@ -102,10 +102,10 @@ func (a errorMsgs) ByType(typ ErrorType) errorMsgs {
|
||||
// Shortcut for errors[len(errors)-1]
|
||||
func (a errorMsgs) Last() *Error {
|
||||
length := len(a)
|
||||
if length == 0 {
|
||||
return nil
|
||||
if length > 0 {
|
||||
return a[length-1]
|
||||
}
|
||||
return a[length-1]
|
||||
return nil
|
||||
}
|
||||
|
||||
// Returns an array will all the error messages.
|
||||
|
Reference in New Issue
Block a user