cli/error.go
f3711704
 package cli
 
d2a9560e
 import "strings"
f3711704
 
 // Errors is a list of errors.
 // Useful in a loop if you don't want to return the error right away and you want to display after the loop,
 // all the errors that happened during the loop.
 type Errors []error
 
d2a9560e
 func (errList Errors) Error() string {
 	if len(errList) < 1 {
f3711704
 		return ""
 	}
d2a9560e
 
 	out := make([]string, len(errList))
 	for i := range errList {
 		out[i] = errList[i].Error()
f3711704
 	}
d2a9560e
 	return strings.Join(out, ", ")
f3711704
 }