Apply go fix ./... (#22037)

This commit is contained in:
Michael Eischer
2026-08-29 21:02:05 +02:00
committed by GitHub
parent 28d802df8c
commit b593ba305b
6 changed files with 19 additions and 15 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ package errors
import (
"errors"
"fmt"
"slices"
)
// fatalError is an error that should be printed to the user, then the program
@@ -36,8 +37,8 @@ func Fatal(s string) error {
func Fatalf(s string, data ...any) error {
// Use the last error found.
var underlyingErr error
for i := len(data) - 1; i >= 0; i-- {
if err, ok := data[i].(error); ok {
for _, d := range slices.Backward(data) {
if err, ok := d.(error); ok {
underlyingErr = err
break
}