golang win可执行文件不显示命令窗口代码
1 package main import "github.com/gonutz/w32" func main() { console := w32.GetConsoleWindow() if console != 0 { _, consoleProcID := w32.GetWindowThreadProcessId(console) if w32.GetCurrentProcessId() == consoleProcID { w32.ShowWindowAsync(console, w32.SW_HIDE) } } }