SkillAgentSearch skills...

Waitabit

😴 A tiny library for handling system interrupts

Install / Use

/learn @heartwilltell/Waitabit
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

View on GitHub
GitHub Stars38
CategoryDevelopment
Updated6mo ago
Forks1

Languages

Go

Security Score

87/100

Audited on Sep 24, 2025

No findings