mirror of
https://github.com/containers/podman.git
synced 2025-12-01 02:27:13 +08:00
vendor: update c/{buildah,common,image,storage} to main
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
12
vendor/github.com/moby/buildkit/util/stack/stack.go
generated
vendored
12
vendor/github.com/moby/buildkit/util/stack/stack.go
generated
vendored
@@ -50,7 +50,7 @@ func Traces(err error) []*Stack {
|
||||
func traces(err error) []*Stack {
|
||||
var st []*Stack
|
||||
|
||||
switch e := err.(type) {
|
||||
switch e := err.(type) { //nolint:errorlint
|
||||
case interface{ Unwrap() error }:
|
||||
st = Traces(e.Unwrap())
|
||||
case interface{ Unwrap() []error }:
|
||||
@@ -63,7 +63,7 @@ func traces(err error) []*Stack {
|
||||
}
|
||||
}
|
||||
|
||||
switch ste := err.(type) {
|
||||
switch ste := err.(type) { //nolint:errorlint
|
||||
case interface{ StackTrace() errors.StackTrace }:
|
||||
st = append(st, convertStack(ste.StackTrace()))
|
||||
case interface{ StackTrace() *Stack }:
|
||||
@@ -85,7 +85,7 @@ func Enable(err error) error {
|
||||
}
|
||||
|
||||
func Wrap(err error, s *Stack) error {
|
||||
return &withStack{stack: s, error: err}
|
||||
return &withStackError{stack: s, error: err}
|
||||
}
|
||||
|
||||
func hasLocalStackTrace(err error) bool {
|
||||
@@ -173,15 +173,15 @@ func convertStack(s errors.StackTrace) *Stack {
|
||||
return &out
|
||||
}
|
||||
|
||||
type withStack struct {
|
||||
type withStackError struct {
|
||||
stack *Stack
|
||||
error
|
||||
}
|
||||
|
||||
func (e *withStack) Unwrap() error {
|
||||
func (e *withStackError) Unwrap() error {
|
||||
return e.error
|
||||
}
|
||||
|
||||
func (e *withStack) StackTrace() *Stack {
|
||||
func (e *withStackError) StackTrace() *Stack {
|
||||
return e.stack
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user