logoalt Hacker News

WesolyKubeczekyesterday at 9:41 AM1 replyview on HN

Can anyone explain why CGO_ENABLED needs to be set to 1 here?


Replies

zsoltkacsandiyesterday at 10:40 AM

In the post it is set to 0. `CGO_ENABLED=0 go build -o init .`

The only reason is because I like to be explicit, and I could not know what was set before in the user's environment.