Skip to content

Glossary: Go Basics

Wrap

Also written: wrapping, wraps

To put one error inside another with `%w` in `fmt.Errorf`, adding context while keeping the original, so `errors.Is` and `errors.As` can still find it.

Where the book teaches it

Related terms

errors.Is and errors.Aserrors.New and fmt.Errorf