golang交叉编译
# X86
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o new_name main.go
# ARM
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build main.go
# X86
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go
# ARM
CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build main.go
# X86
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build main.go
# ARM
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build main.go
- 上一篇: iptables配置新增删除
- 下一篇: 查看磁盘空间