This repository has been archived on 2025-08-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
PKGBUILD/pkg/internal/prittyprint/prittyprint.go
T

19 lines
326 B
Go

package prittyprint
import "fmt"
func FormatErrors(errors []error) error {
if len(errors) > 0 {
errMsg := ""
for i, err := range errors {
if i == 0 {
errMsg = fmt.Sprintf("%v", err.Error())
} else {
errMsg = fmt.Sprintf("%v\n%v", errMsg, err.Error())
}
}
return fmt.Errorf(errMsg)
}
return nil
}