Skip to content

Glossary: Go Beyond the Basics

ctx.Err()

Also written: Err

Says why a context ended: `context.Canceled` or `context.DeadlineExceeded`. It returns nil while the context is still live.

Where the book teaches it

Related terms

context.Canceledcontext.DeadlineExceededctx.Done()