Skip to content

Commit

Permalink
cli: remove deprecated Errors type
Browse files Browse the repository at this point in the history
The Errors type was deprecated in d3bafa5,
which has been included in the 27.4.0 release.

This patch removes the type, as there are no external consumers.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Oct 22, 2024
1 parent 1aab64d commit 5f4b149
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions cli/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,8 @@ package cli

import (
"strconv"
"strings"
)

// 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.
//
// Deprecated: use [errors.Join] instead; will be removed in the next release.
type Errors []error

func (errList Errors) Error() string {
if len(errList) < 1 {
return ""
}

out := make([]string, len(errList))
for i := range errList {
out[i] = errList[i].Error()
}
return strings.Join(out, ", ")
}

// StatusError reports an unsuccessful exit by a command.
type StatusError struct {
Status string
Expand Down

0 comments on commit 5f4b149

Please sign in to comment.