mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 12:37:49 +00:00
props did not have context, therefore they had no idea where they were or where to resolve from. Signed-off-by: quobix <dave@quobix.com>
16 lines
304 B
Go
16 lines
304 B
Go
// Copyright 2023 Princess B33f Heavy Industries / Dave Shanley
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package utils
|
|
|
|
func UnwrapErrors(err error) []error {
|
|
if err == nil {
|
|
return []error{}
|
|
}
|
|
if uw, ok := err.(interface{ Unwrap() []error }); ok {
|
|
return uw.Unwrap()
|
|
} else {
|
|
return []error{err}
|
|
}
|
|
}
|