// Hooks returns a copy of current hooks.
Hooks returns a copy of current hooks.
// Hooks returns a copy of current hooks .
func (s *Shutdown) Hooks() map[string]func(os.Signal) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	fns := map[string]func(os.Signal){}
	for key, cb := range s.hooks {
		fns[key] = cb
	}
	return fns
}
func ( s * Shutdown ) Hooks ( ) map [ string ] func ( os . Signal ) { s . mutex . Lock ( ) defer s . mutex . Unlock ( ) fns := map [ string ] func ( os . Signal ) { } for key , cb := range s . hooks { fns [ key ] = cb } return fns }
Hooks returns a copy of current hooks.
Hooks returns a copy of current hooks .