【文件属性】:
文件名称:tebata:用于golang的简单Linux信号处理程序
文件大小:20KB
文件格式:ZIP
更新时间:2021-05-14 16:46:09
golang linux-signal-handler Go
手旗
概述
Go的简单Linux信号处理程序
安装
go get -u github.com/syossan27/tebata
用法
package main
import (
"fmt"
"strconv"
"syscall"
"github.com/syossan27/tebata"
)
func main () {
t := tebata . New ( syscall . SIGINT , syscall . SIGTERM )
// Do function when catch signal.
t . Reserve ( sum , 1 , 2 )
t . Reserve ( hello )
t . Reserve ( os . Exit , 0 )
for {
// Do something
}
}
func sum ( firstArg
【文件预览】:
tebata-master
----Gopkg.toml(740B)
----tebata.go(2KB)
----example()
--------main.go(475B)
----LICENSE(1KB)
----Gopkg.lock(432B)
----README.md(1KB)
----tebata_test.go(1KB)
----resources()
--------logo.png(15KB)
----.gitignore(284B)