delete unused functions in pkg/util directory

This commit is contained in:
HirazawaUi
2023-01-16 17:00:04 +08:00
parent 4c4d4ad0a4
commit 488b34eeb2
13 changed files with 0 additions and 1455 deletions

View File

@@ -36,17 +36,6 @@ type Handler struct {
once sync.Once
}
// Chain creates a new handler that invokes all notify functions when the critical section exits
// and then invokes the optional handler's notifications. This allows critical sections to be
// nested without losing exactly once invocations. Notify functions can invoke any cleanup needed
// but should not exit (which is the responsibility of the parent handler).
func Chain(handler *Handler, notify ...func()) *Handler {
if handler == nil {
return New(nil, notify...)
}
return New(handler.Signal, append(notify, handler.Close)...)
}
// New creates a new handler that guarantees all notify functions are run after the critical
// section exits (or is interrupted by the OS), then invokes the final handler. If no final
// handler is specified, the default final is `os.Exit(1)`. A handler can only be used for