TrapSignals create signal/interrupt handlers as best it can for the current OS. This is a rather invasive function to call in a Go program that captures signals already, so in that case it would be better to implement these handlers yourself.
()
| 27 | // that captures signals already, so in that case it would be better to |
| 28 | // implement these handlers yourself. |
| 29 | func TrapSignals() { |
| 30 | trapSignalsCrossPlatform() |
| 31 | trapSignalsPosix() |
| 32 | } |
| 33 | |
| 34 | // trapSignalsCrossPlatform captures SIGINT or interrupt (depending |
| 35 | // on the OS), which initiates a graceful shutdown. A second SIGINT |
nothing calls this directly
no test coverage detected