https://codingnote.cc/zh-my/p/687981/
优雅退出在Golang中的实现