Documentation
¶
Overview ¶
Package ghook package does prevent your program main function to exit when all your worker code in goroutine.
Example ¶
//the code block should be last in your main function code
RegistShutdown(func() {
//do something before program exit
})
WaitShutdown()
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
IsMock = false
)
Functions ¶
func RegistShutdown ¶
func RegistShutdown(fn func())
func WaitShutdown ¶
func WaitShutdown()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.