mirror of
https://github.com/gin-gonic/gin.git
synced 2025-07-04 11:23:20 +08:00
Improves documentation
This commit is contained in:
12
errors.go
12
errors.go
@ -109,13 +109,11 @@ func (a errorMsgs) Last() *Error {
|
||||
}
|
||||
|
||||
// Returns an array will all the error messages.
|
||||
// Example
|
||||
// ```
|
||||
// c.Error(errors.New("first"))
|
||||
// c.Error(errors.New("second"))
|
||||
// c.Error(errors.New("third"))
|
||||
// c.Errors.Errors() // == []string{"first", "second", "third"}
|
||||
// ``
|
||||
// Example:
|
||||
// c.Error(errors.New("first"))
|
||||
// c.Error(errors.New("second"))
|
||||
// c.Error(errors.New("third"))
|
||||
// c.Errors.Errors() // == []string{"first", "second", "third"}
|
||||
func (a errorMsgs) Errors() []string {
|
||||
if len(a) == 0 {
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user