go在windows下编译为exe文件,在linux怎么编译运行

zbzw · · 5155 次点击
GOOS=linux GOARCH=amd64 go build xxx.go
#3
更多评论
请使用交叉编译,编译为 linux 下的可执行文件。
#1
把代码放linux上再编译一下
#2