Package Context : add package for config context

This commit is contained in:
Nicolas JUHEL
2020-12-31 15:55:08 +01:00
parent 7b3db78e65
commit 3039ec2f81
2 changed files with 176 additions and 1 deletions

View File

@@ -101,8 +101,9 @@ func (c *ctxGinTonic) CancelOnSignal(s ...os.Signal) {
select {
case <-sc:
c.c()
return
case <-c.Done():
return
}
}()
}