Beego: mac下交叉编译问题

Created on 13 Jan 2018  ·  2Comments  ·  Source: astaxie/beego

go 1.9.2
sublime Text3
mac下开发
要部署到centos下
该如何交叉编译呢?CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build这个命令吗?

Most helpful comment

bee pack -be GOOS=linux

All 2 comments

其实只要 export GOOS=linux 即可编译出linux版的二进制文件

bee pack -be GOOS=linux

Was this page helpful?
0 / 5 - 0 ratings