Go also known as golang, is a programming language developed at Google. It is a statically typed language with syntax loosely derived from that of C, Go feature an automatic memory management and type safety. You can learn more about Go from Wikipedia.
We will be installing Go using Gophers PPA. This PPA will install the latest stable version of Go available for Ubuntu.
Adding the PPA.
sudo add-apt-repository ppa:gophers/go
Updating local repository database.
Writing you first Go program.
- Create a file named ‘app.go’. Go uses .go as extension to identify a Go language file.
- Use your favorite editor to open the file ‘app.go’.
- Add the lines given below to the file.
Save the changes you have made in the file.
Now execute the programming by entering the command below.
go run app.goCode language: CSS (css)
We now have Go language compiler installed on Ubuntu. If you have any problem feel free to leave a comment below.
I compiled a list of software and services that I use to improve my workflow, here is the link to the list.