diff --git a/src/Development/Go/errors.md b/src/Development/Go/errors.md new file mode 100644 index 0000000..8b8a72a --- /dev/null +++ b/src/Development/Go/errors.md @@ -0,0 +1,13 @@ +# [errors](https://golang.org/pkg/errors/) + +Wrap error: + +```go +err := fmt.Errorf("Something wrong: %w", rootErr) +``` + +Unwrap error: + +```go +rootErr := errors.Unwrap(err) +``` diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 3552007..31655d3 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -44,6 +44,7 @@ - [ANTLR](Development/ANTLR/README.md) - [Condition](Development/ANTLR/Condition.md) - [Go](Development/Go/README.md) + - [errors](Development/Go/errors.md) - [strings](Development/Go/strings.md) - [testing](Development/Go/testing.md) - [time](Development/Go/time.md)