()
| 14 | } |
| 15 | |
| 16 | func (e *Error) Error() string { |
| 17 | points := make([]string, len(e.Errors)) |
| 18 | for i, err := range e.Errors { |
| 19 | points[i] = fmt.Sprintf("* %s", err) |
| 20 | } |
| 21 | |
| 22 | sort.Strings(points) |
| 23 | return fmt.Sprintf( |
| 24 | "%d error(s) decoding:\n\n%s", |
| 25 | len(e.Errors), strings.Join(points, "\n")) |
| 26 | } |
| 27 | |
| 28 | // WrappedErrors implements the errwrap.Wrapper interface to make this |
| 29 | // return value more useful with the errwrap and go-multierror libraries. |
no outgoing calls