Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 308 Bytes

golang.md

File metadata and controls

18 lines (12 loc) · 308 Bytes

Golang

Remove Debugging Information

go build -ldflags "-w -s"
  • that will remove the debugging information and shrink the binary size by ~30%.

Cross Compilation

  • GOOS -> Operating system
  • GOARCH -> Architecture
GOOS="linux" GOARCH="amd64" go build hello.go