Update module github.com/openshift/imagebuilder to v1.2.15

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2024-08-22 15:57:06 +00:00
committed by GitHub
parent 77f5b4d678
commit 215af114ab
43 changed files with 1378 additions and 371 deletions

View File

@@ -46,22 +46,23 @@ func Helper() {
func Traces(err error) []*Stack {
var st []*Stack
wrapped, ok := err.(interface {
Unwrap() error
})
if ok {
st = Traces(wrapped.Unwrap())
switch e := err.(type) {
case interface{ Unwrap() error }:
st = Traces(e.Unwrap())
case interface{ Unwrap() []error }:
for _, ue := range e.Unwrap() {
st = Traces(ue)
// Only take first stack
if len(st) > 0 {
break
}
}
}
if ste, ok := err.(interface {
StackTrace() errors.StackTrace
}); ok {
switch ste := err.(type) {
case interface{ StackTrace() errors.StackTrace }:
st = append(st, convertStack(ste.StackTrace()))
}
if ste, ok := err.(interface {
StackTrace() *Stack
}); ok {
case interface{ StackTrace() *Stack }:
st = append(st, ste.StackTrace())
}