Skip to content

Glossary: Go Beyond the Basics

signal.NotifyContext

Also written: os/signal

Returns a context that is canceled when the program gets a signal such as Ctrl+C, plus a `stop` function used like `cancel`.

Where the book teaches it

Related terms

Ctrl+Ccontext (context.Context)srv.Shutdown