Small code enhancements
This commit is contained in:
parent
015cd7a3d0
commit
9cd47dd2aa
41 changed files with 187 additions and 85 deletions
|
@ -7,7 +7,7 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
// ContextWithSignal create a context cancelled when SIGINT or SIGTERM are notified
|
||||
// ContextWithSignal creates a context canceled when SIGINT or SIGTERM are notified
|
||||
func ContextWithSignal(ctx context.Context) context.Context {
|
||||
newCtx, cancel := context.WithCancel(ctx)
|
||||
signals := make(chan os.Signal)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue