Skip to content

Commit ea511f0

Browse files
authored
Merge pull request #5549 from thaJeztah/remove_cli_errors
cli: remove deprecated Errors type
2 parents 1aab64d + 5f4b149 commit ea511f0

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

cli/error.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,8 @@ package cli
22

33
import (
44
"strconv"
5-
"strings"
65
)
76

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.
11-
//
12-
// Deprecated: use [errors.Join] instead; will be removed in the next release.
13-
type Errors []error
14-
15-
func (errList Errors) Error() string {
16-
if len(errList) < 1 {
17-
return ""
18-
}
19-
20-
out := make([]string, len(errList))
21-
for i := range errList {
22-
out[i] = errList[i].Error()
23-
}
24-
return strings.Join(out, ", ")
25-
}
26-
277
// StatusError reports an unsuccessful exit by a command.
288
type StatusError struct {
299
Status string

0 commit comments

Comments
 (0)