3 ms·
You can usually build fully static by doing CGO_ENABLED=0 go build even when using os/user or net/
by ptman 9y ago
You can usually build fully static by doing
CGO_ENABLED=0 go build
even when using os/user or net/
- sebcat 9y agoAt a computer with go1.4.2 freebsd/amd64 ATM (earlier was go1.8.1 linux/amd64 IIRC) and the above os/user example results in a dynamically linked ELF when built with CGO_ENABLED set to 0.