天天看點

go相關

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

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

不然會報錯 :cannot execute binary file

go