Hacker News new | ask | show | jobs
by ptman 3225 days ago
You can usually build fully static by doing

    CGO_ENABLED=0 go build
even when using os/user or net/
1 comments

At 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.