
https://www.youtube.com/playlist?list=PLehOyJfJkFkJ5m37b4oWh783yzVlHdnUH
Size: a a a
signal.Notify
. 😕 Ну я взял и сделал оберточку над этим все делом.ctx, cancel := context.WithCancel(context.Background())
wait := NewWait(os.Interrupt)
go wait.WaitWithFunc(func() {
cancel()
fmt.Println("Bye")
})
// Output: Bye