go相关

mac 上build go  如果想要在centos上面执行 必须使用下面的方式

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a  -o hello hello.go

不然会报错 :cannot execute binary file

posted @ 2021-04-16 17:58  s。  阅读(38)  评论(0编辑  收藏  举报