Registry / utility / xlab-closer

xlab-closer

JSON →
library1.1.0gogounverified

Provides a universal way to catch application exit events (signals, panics) and perform cleanup actions before termination.

go get github.com/xlab/closer
INSTALL
IMPORT
SIG · XLAB-CLOSER
X
xlab-closer
utilitygov1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

closer
github.com/xlab/closer

Binds a cleanup function and holds the program until a signal or panic triggers it.

package main import "github.com/xlab/closer" func main() { closer.Bind(func() { println("cleanup") }) closer.Hold() }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
Resources
xlab-closer — go get xlab-closer · libregistry