When collaborating with colleagues to develop golang projects, colleagues were developing on the Windows platform. Once the project was run, they found an error. Later, I tried debugging under the Mac environment and installed the Windows compilation environment:
$ cd /usr/local/go/src/
$ sudo CGO_ENABLED=0 GOOS=windows GOARCH=amd64 ./
After debugging, I found that it was not supported on Windows. I was really depressed. Later, during development, I found that the compilation test package under mac has also slowed down significantly. It turned out that it could be compiled in 1 or 2 seconds, but now it takes 5 or 6 seconds. It is suspected that it was caused by the previous installation of the Windows compilation environment, so it was OK to try to reinstall the golang language.
The above is the solution to this article, I hope you like it.