Go 1.13rc1 released on 08/22, which includes some new features that people want to try out. However, you only want to test the new language features without changing the settings of your working environment. Here's a new way: directly download the latest version to the Go binary file, without directly replacing your working environment.
Download Go binary by using go get
By using the command go get golang.org/dl/go1.13rc1 (you can quickly change it to any version you need), you can download the installation file under your $GOBIN. By executing go1.13rc1 download, the complete executable file will be downloaded. The default installation path will be /Users/YOUR_NAME/sdk/go1.13rc1/. After that, you can use go1.13rc1 to try out the latest version's features.
Install Multiple Versions of the Compiler
With this method, you can also quickly install multiple versions of the Go(lang) binary for related regression testing or running some performance benchmarks. Here is a simple example to install the older version of Go 1.11:
go get golang.org/dl/go1.11$GOBIN/go1.11 download
Hope this helps everyone, let's try it out together!!

Top comments (0)