一致的构建/从二进制文件中删除个人信息

I've now realized that Go saves absolute paths to source code in binaries for the purpose of printing stack-traces and the likes. I don't want to completely remove this information, however, this also means that every developer building the same program will produce an executable with a different checksum. Before I try to reimplement the build using chroot or something like that: isn't there any way to tell Go not to use absolute paths for this purpose?

I know it doesn't directly address what you asked, but @JimB's suggestion does indicate a class of solutions to the problem you seem to be having.

One of the easier ones (I think) would be to have your developers install Docker and create an alias so that the go command runs:

docker run --rm --tty --volume $GOPATH:/go golang:1.7.1(-$YOUR_PLATFORM) go

Then, every build (and test and run) thinks it's using a GOPATH of /go and your developers' checksums won't disagree based on that.

See here for more info.