Description

Package atexit implements a simple atexit library.

Example:

package main

import (
	"fmt"

	"bitbucket.org/JeremySchlatter/go-atexit"
)

func main() {
	atexit.TrapSignals()
	defer atexit.CallExitFuncs()

	atexit.Run(func() {
		fmt.Println("exited")
	})
}

atexit is referenced in 0 repositories