Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gontainer/grouperror
https://github.com/gontainer/grouperror
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gontainer/grouperror
- Owner: gontainer
- License: mit
- Created: 2024-02-27T19:24:14.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-05T15:31:54.000Z (10 months ago)
- Last Synced: 2024-06-21T14:27:10.916Z (7 months ago)
- Language: Go
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Go Reference](https://pkg.go.dev/badge/github.com/gontainer/grouperror.svg)](https://pkg.go.dev/github.com/gontainer/grouperror)
[![Tests](https://github.com/gontainer/grouperror/actions/workflows/tests.yml/badge.svg)](https://github.com/gontainer/grouperror/actions/workflows/tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/gontainer/grouperror/badge.svg?branch=main)](https://coveralls.io/github/gontainer/grouperror?branch=main)
[![Go Report Card](https://goreportcard.com/badge/github.com/gontainer/grouperror)](https://goreportcard.com/report/github.com/gontainer/grouperror)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gontainer_grouperror&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=gontainer_grouperror)# Grouperror
This package provides a toolset to join and split errors.
```go
err := grouperror.Prefix("my group: ", errors.New("error1"), nil, errors.New("error2"))
errs := grouperror.Collection(err) // []error{error("my group: error1"), error("my group: error2")}
```See [examples](examples_test.go).