Documentation ¶
Overview ¶
Package lib grouping various libraries
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitStatus ¶
func WaitStatus() int
WaitStatus waits for a signal or an error and returns an integer value. It registers the SIGINT and SIGTERM signals using the signal.Notify method, then waits for either a signal or an error using a select statement. If a signal is received, it sends a value of 0 to the "done" channel. If an error is received, it prints the error and sends a value of 1 to the "done" channel. Finally, it waits for a value to be received from the "done" channel and returns it as the result of the function.
func WithCriticalError ¶
func WithCriticalError(criticalError error)
WithCriticalError quit the program following when a critical error occurs
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.