+ Refactored all imports + Fixed a bug for the logging regarding removing \n \t \r + Updated to current MGO release + Changed the name of ICCC
19 lines
266 B
Go
19 lines
266 B
Go
package Shutdown
|
|
|
|
import (
|
|
"container/list"
|
|
"os"
|
|
"os/signal"
|
|
)
|
|
|
|
func init() {
|
|
shutdownHandlers = list.New()
|
|
}
|
|
|
|
func InitShutdown() {
|
|
|
|
// Apply the shutdown handler:
|
|
signal.Notify(shutdownSignal, os.Interrupt, os.Kill)
|
|
go executeShutdown()
|
|
}
|