To manually install the Go tools, use the official Go documentation and follow the instructions.
or
Follow this short installation guide up the end of the section "Go Environment" if you're using brew
.
To manually install the Go tools, use the official Go documentation and follow the instructions.
Note: A quick Windows setup guide can be found here
The following wget
command makes use of this open source repository to install Golang onto your machine and configure the environment.
wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh \
| bash -s -- --version 1.14.3
or
Follow this quick installation guide. Making sure you change 1.11
-> 1.14.x
(This should also work on Ubuntu 20.04)
In your terminal, check your go version by using the following command
go version
The output for this will will depend upon your system but we just care about the command running / showing the correct version. You should get the following output (or similar):
go version go1.14.3 darwin/amd64
Once Go is installed via which ever method you have chosen, it is important to ensure your system follows the folder tree shown below:
.
├── $HOME
│ ├── /<user>
│ ├── /go
│ ├── /bin
│ ├── /pkg
│ └── /src
│ └── /github.com
If you are using a Windows machine and have installed Golang by using the gox.x.x.windows-amd64.msi
official executable, you may have extra files in the directories. Just ensure the paths above also exist.
Login or create an IBM Cloud account
-
Install the IBM Cloud command-line interface from this link.
Once installed, you can access IBM Cloud from your command-line with the prefix
ibmcloud
. -
Log in to the IBM Cloud CLI:
ibmcloud login
. -
Enter your IBM Cloud credentials when prompted.
Note: If you have a federated ID, use
ibmcloud login --sso
to log in to the IBM Cloud CLI. Enter your user name, and use the provided URL in your CLI output to retrieve your one-time passcode. You know you have a federated ID when the login fails without the--sso
and succeeds with the--sso
option.
- Install the IBM Cloud Foundry command-line interface with the command
ibmcloud cf install
Login or create a Twitter account
Visual Studio Code with the recommended Go extension. When you begin to code Go inside VSCode you may be prompted to install a bunch of extensions. These are good and will help make development much easier!
If you are using this option, to make development easier a suggestion is to amend the imports setting on the extension once you have installed it. This will help delete unused imports and add them in when needed, resulting in less ambiguous errors. To do this follow the 2 quick steps below:
Scroll down until you find the Go: Format Tool
options (its in alphabetical order)
OR
Jet Brains GoLand (GoLand isn't free but it does have a 30 day free trial)
- Visit GitHub to create an account
- To install
git
follow the instructions on the officialgit
documentation.
Once you are all set up you can move straight on to Lab 1