Improves documentation

This commit is contained in:
Manu Mtz.-Almeida
2016-01-26 22:40:29 +01:00
parent e9531e5c76
commit 61fae4997d
4 changed files with 22 additions and 21 deletions

View File

@ -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