func CallExitFuncs() {
	for i := len(exitFuncs) - 1; i >= 0; i-- {
		exitFuncs[i]()
	}
}
CallExitFuncs calls all functions previously registered through Run, in reverse order.
package atexit
import (
	"os"
	"os/signal"
	"syscall"
)
var exitFuncs []func()
func TrapSignals() {
	c := make(chan os.Signal, 1)
	signal.Notify(c, syscall.SIGINT, syscall.SIGTERM)
	go func() {
		<-c
		CallExitFuncs()
		os.Exit(1)
	}()
}
func Run(f func()) {
	exitFuncs = append(exitFuncs, f)
}