8 // Errors is a list of errors.
9 // Useful in a loop if you don't want to return the error right away and you want to display after the loop,
10 // all the errors that happened during the loop.
13 func (errList Errors) Error() string {
18 out := make([]string, len(errList))
19 for i := range errList {
20 out[i] = errList[i].Error()
22 return strings.Join(out, ", ")
25 // StatusError reports an unsuccessful exit by a command.
26 type StatusError struct {
31 func (e StatusError) Error() string {
32 return fmt.Sprintf("Status: %s, Code: %d", e.Status, e.StatusCode)