package
0.0.0-20240519111142-3e416e18f32e
Repository: https://github.com/snail007/gmc.git
Documentation: pkg.go.dev

# README

Demo

hook package does prevent your program main function to exit when all your worker code in goroutine.

package hook

import (
	"github.com/snail007/gmc/process/hook"
)

func main() {
	//your business code here
	
	ghook.RegistShutdown(func() {
		//do something before program exit
	})
    //this will waiting for singal, prevent program main function to exit
	ghook.WaitShutdown()
}

# Functions

MockShutdown just for testing.
No description provided by the author
No description provided by the author

# Variables

No description provided by the author