The export CGO_ENABLED=0 is there only to not add it each time we build. We know we need CGO to be disabled so we disable it "globally"
Now, as you might have noticed, this is not taken into account if you do not do a 'go build -a' or 'go install -a'. That's why we do this trick with go test in order to rebuild the std lib cache and generate all the .a libs without CGO. The most important being the net package.

We didn't find any equivalent of `go test -i -a` with build and install. Doing a `CGO_ENABLED=0 go build -a` or `CGO_ENABLED=0 go install -a` will work but will not regenerate the .a and requires to rebuild everything each time.

Ex: `GO_ENABLED=0 go build -ldflags '-d' -a` works but doing `CGO_ENABLED=0 go build -ldflags '-d'` right after wont.