Proposal Details
Currently, NotifyContext returns a context without cancel cause
func NotifyContext(parent context.Context, signals ...os.Signal) (ctx context.Context, stop context.CancelFunc) {
ctx, cancel := context.WithCancel(parent)
...
}
It is better to return a cause so that we can know it is canceled by a signal
Like that:
func NotifyContext(parent context.Context, signals ...os.Signal) (ctx context.Context, stop context.CancelFunc) {
ctx, cancel := context.WithCancelCause(parent)
...
}
Proposal Details
Currently, NotifyContext returns a context without cancel cause
It is better to return a cause so that we can know it is canceled by a signal
Like that: