Registry / utility / sethvargo-go-signalcontext

sethvargo-go-signalcontext

JSON →
library0.2.1gogounverified

Package signalcontext creates context.Contexts that cancel on os.Signals. Deprecated: Use signal.NotifyContext instead.

go get github.com/sethvargo/go-signalcontext
INSTALL
IMPORT
SIG · SETHVARGO-GO-SIGNA
S
sethvargo-go-signalcontext
utilitygov0.2.1
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.

signalcontext
github.com/sethvargo/go-signalcontext

Creates a context that cancels on interrupt signal.

package main import ( "context" "github.com/sethvargo/go-signalcontext" ) func main() { ctx, cancel := signalcontext.OnInterrupt() defer cancel() _ = ctx }
Debug
Known issues
breakingThis package is deprecated; use signal.NotifyContext from the standard library instead.
fix
Replace with signal.NotifyContext from the os/signal package.
affects: >=0.0.0
Upgrade
Version history
0.2.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
sethvargo-go-signalcontext — go get sethvargo-go-signalcontext · libregistry