Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Accumulating and returning all errors

One of the simplest strategies at our disposal involves the introduction of a mechanism for collecting and accumulating all errors emitted by any of the pipeline components while the pipeline is executing. Once the pipeline detects an error, it automatically discards the payload that triggered the error, but appends the captured error to a list of collected errors. The pipeline resumes its execution with the next payload till all payloads have been processed.

After the pipeline execution completes, any collected errors are returned back to the user. At this point, we have the option to either return a slice of Go error values or use a helper package, such as hashicorp/go-multierror [6], which allows ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content