> Check out your code into some random directory. Copy the directory to a USB drive and walk it over to an air gapped machine (no wi-fi, no ethernet, clean dev environment installed). Copy the directory to the box, make some small code change and try to build your binary.
I don’t follow. Why is the code change important?
Why not just use the go module cache? Seems like a much cleaner solution with very little overhead.