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.
type IStdHelper ¶ added in v1.1.0
type IStdHelper interface { // Println prints a message to stdout or queue message if queue is enabled. Println(message any) // PrintlnStdErr prints a message to stderr or queue message if queue is enabled. PrintlnStdErr(message any) // EnableQueue enables queue. EnableQueue() // PrintQueuedMessages prints queued messages. PrintQueuedMessages() }
IStdHelper is a helper to print stdout & stderr with ability to enable queue messages then will print them out when requested by PrintQueuedMessages().
var StdHelper IStdHelper = &stdHelper{ mutex: &sync.RWMutex{}, queuedMessages: nil, }
StdHelper implements IStdHelper, to be used to queue messages during T-UI active, then print them out when T-UI is closed. This is to work around the issue that T-UI will clear the screen and error messages will be lost.
Click to show internal directories.
Click to hide internal directories.