Waitabit
😴 A tiny library for handling system interrupts
Install / Use
/learn @heartwilltell/WaitabitREADME
Wait a bit
Tiny library for manage you application shutdown in graceful way by catching the OS signals.
⚠️ This repository is now archived. Please use os/signal.NotifyContext instead
Documentation
Installation
go get -u github.com/heartwilltell/waitabit
Usage
package main
import (
"log"
"os"
"github.com/heartwilltell/waitabit"
)
func main() {
// call your application here ...
wait := waitabit.NewWait(os.Interrupt)
wait.WaitWithFunc(func() {
log.Println("Bye")
})
// or ...
waitabit.NewWait(os.Interrupt).WaitWithFunc(func() {
log.Println("Bye")
})
}
Related Skills
node-connect
348.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
348.5kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
109.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
