Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintfStdErr ¶
func PrintlnStdErr ¶
func PrintlnStdErr(a ...any)
Types ¶
type FuncUponAppExit ¶ added in v1.0.3
type FuncUponAppExit func()
FuncUponAppExit is a function that will be executed upon app exit. Panics will be ignored.
type IAppExitHelper ¶ added in v1.0.3
type IAppExitHelper interface {
// RegisterFuncUponAppExit registers a function to be executed upon app exit.
RegisterFuncUponAppExit(funcUponAppExit FuncUponAppExit)
// ExecuteFunctionsUponAppExit executes all registered functions (LIFO) upon app exit.
// Panics will be ignored and methods will be executed only once.
ExecuteFunctionsUponAppExit()
}
IAppExitHelper is a helper to register and execute functions upon app exit.
var AppExitHelper IAppExitHelper = &appExitHelper{ mutex: &sync.Mutex{}, executedFunctionsUponAppExit: false, funcUponAppExit: nil, }
AppExitHelper is a helper to register and execute functions upon app exit.
Click to show internal directories.
Click to hide internal directories.