I will answer my own question and hope it helps someone else.
foo_windows.go was not included in the build because of unexpressed build errors. Specifically,
foo_windows.go contains C code, and because
CGO_ENABLED=0 by default, go didn't try compiling it, it just saw there was C code in the file and excluded the file. Setting
CGO_ENABLED=1 included the file in the build.