I've been studying Go recently and found that the differences between versions are quite significant. Here, I'll share how to downgrade Go; this method has broad applicability:
Step 1: Confirm your version
~|⇒ go version go version go1.13.4 darwin/amd64
Step 2: Install the version you need.
brew install go@1.12
Step 3: unlink
~|⇒ brew unlink go Unlinking /usr/local/Cellar/go/1.13.4... 3 symlinks removed
Step 4: Force link
~|⇒ brew link --force go@1.12 Linking /usr/local/Cellar/go@1.12/1.12.9... 3 symlinks created
After completing the above steps, you can check the version again. The downgrade should be successful. At this point, please clear your cache, especially the dependencies; clear the cache and download again. If using GoLand, remember to select the newer version.
This siteOriginal articleAll follow "Attribution-NonCommercial-ShareAlike 4.0 License (CC BY-NC-SA 4.0)Please retain the following annotations when sharing or adapting:
Original author:Jake Tao,source:How to downgrade Golang from version 1.13 to 1.12?