go mac 交叉编译 linux

CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' -o server ./server.go

原文地址:https://www.cnblogs.com/macil/p/12091195.html