Install go2 beta on MacOS

A quick guide on installing golang v2 development revision.
It works for my MacOS Big Sur (with an Intel processor).

Save somewhere the values of the following environment variables:

Then change your environment variables like that:

Then create a file somewhere and name it main.go2

You should be able to run it with

To revert back to your regular golang v1, change the vars back to:

Useful links: