在Golang中处理信号以优雅地终止操作

60 阅读1分钟

在这个例子中,我们将捕捉某些信号,并在终止循环操作前等待3秒。

例子

package main
package app

测试

2020/03/16 21:47:25 1 - sleeping 300 milliseconds