exit_handler

package
v0.0.0-...-d138ab2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddExitFunc

func AddExitFunc(f func()) func()

AddExitFunc adds a given function to the list of functions that should return at exit. Its return value is the same function, wrapped in a sync.Once. If for some reason you want to call the handler before program exit, you can call the returned function.

func RunExitFuncs

func RunExitFuncs()

RunExitFuncs runs all the registered exit funcs. This function should be called at the end of main(), or whenever the program is calling os.Exit().

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL