go windows 后台运行

1.导入一个包即可。

_  "github.com/codyguo/godaemon"

使用方法:

./example -d=true 或者 ./example -d true

 

 

2.查看端口占用

3.然后根据查询的PID找到对应的进程

4.终止进程

 

posted on 2022-02-17 14:46  zwjphp  阅读(418)  评论(0编辑  收藏  举报