Golang 代码编译问题
Golang 代码编译问题
| SET CGO_ENABLED=0 SET GOOS=darwin SET GOARCH=amd64 go build main.go
SET CGO_ENABLED=0 SET GOOS=linux SET GOARCH=amd64 go build main.go
|
1 2 3
| CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build main.go CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go
|
1 2 3
| CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go # linux CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go # windows
|