https://github.com/tedconf/atexit
https://github.com/tedconf/atexit
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tedconf/atexit
- Owner: tedconf
- License: mit
- Created: 2023-09-27T17:15:49.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-21T15:28:37.000Z (almost 2 years ago)
- Last Synced: 2025-04-09T20:47:15.110Z (about 1 year ago)
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
Git Mirror of https://bitbucket.org/tebeka/atexit
========================
About
=====
Simple `atexit` implementation for Go_.
Note that you *have* to call `atexit.Exit` and not `os.Exit` to terminate your
program (that is, if you want the `atexit` handlers to execute).
Example usage
=============
::
package main
import (
"atexit"
"fmt"
)
func handler() {
fmt.Println("Exiting")
}
func main() {
atexit.Register(handler)
atexit.Exit(0)
}
Install
=======
::
goinstall bitbucket.org/tebeka/atexit
Contact
=======
Home
https://bitbucket.org/tebeka/atexit
Author
Miki Tebeka
.. _Go: http://golang.org