Forcing static binaries with glibc and Go on Linux

go build dynamically links against glibc on Linux by default, resulting in errors like this when you run the binary:

./db2xlsx: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by ./db2xlsx) ./db2xlsx: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by ./db2xlsx)

You can force this not to happen with:

CGO_ENABLED=0 go build

I found this after building db2xlsx on a host with 2.35 and deploying to one with 2.17.