Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandUserPath ¶
ExpandUserPath expands the specified user home relative path to an absolute path. Supports '~', '$HOME' for Unix based environments and '%userprofile%' '%homepath%' for windows. If the provided path has no home dir prefix the path returns as is. Relative paths are not expanded.
func RegisterShutdownHook ¶
func RegisterShutdownHook(hook HookFn)
RegisterShutdownHook registers a hook for system call signals SIGTERM and SIGKILL
Types ¶
type HookFn ¶
HookFn a signal handler
func NewSignalHook ¶
NewSignalHook returns a hook that only invokes the specified function if the received signal matches the specified one. Supported signals are SIGTERM and SIGKILL
Click to show internal directories.
Click to hide internal directories.