The tl;dr is that the Go linker -X option is awesome.
Read about it on the CloudFlare blog.

Setting Go variables from the outside | CloudFlare Blog (archive)