构建时加入参数 -ldflags "-H windowsgui" eg:go build -ldflags "-H windowsgui" project.go 转载于:https://www.cnblogs.com/ekaiser/p/3382684.html