As we are going to program our smart contract (or chaincode) in Go, we need to download the source code, install the compiler, and set up some environment paths. Execute the following command in a Terminal shell to download Go 1.10.3:
$> sudo curl -O https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz
This should result in an output similar to the following:
% Total % Received % Xferd Average Dload100 126M 100 126M 0 0 26.6M
Next, use tar to unpack the downloaded file. The following command will use the Tar tool to open and expand the contents of the file and create a folder called go. The second command moves the folder to the preferred /usr/local location:
$> sudo tar -xvf go1.10.3.linux-amd64.tar.gz$> sudo mv go ...