1、不显示dos运行窗口
    go build -ldflags=”-H windowsgui”
    image.png

    2、交叉编译
    windows编译linux可运行程序
    添加 GOOS=linux;GOARCH=amd64
    image.png