Files
libopenapi/utils/unwrap_errors.go
2023-10-14 12:36:38 -04:00

12 lines
245 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{}
}
return err.(interface{ Unwrap() []error }).Unwrap()
}