From Go 1.16 onwards, you’ll be able to use 1 2 ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt) defer stop() to control context cancelation using Unix signals, simplifying handling operating system signals in Go for certain common cases. This is my first contribution to the Go standard library, and I am very excited! Why When writing CLI code, I often needed to handle cancellation – for instance, when a user presses CTRL+C producing an interrupt signal.