Go has mechanical sympathy. So does that mean I need to modify my code based on the hardware I am running, for the best possible performance? How does that work in a cloud environment like K8s where a developer doesn't care about the hardware?
Go compiles across all relevant architectures. You do not have to modify your code for different platforms. In cloud environments (like Kubernetes for example) you usually use docker images or drop in your binary.