Learning Golang — Day 0

Hasan Gürcan
2 min readJan 3, 2021

Within this series of blogposts, I want to share my learning path of golang so others can benefit from this. Of course one will benefit from the Protégé Effect, too.

My motivation for learning this programming language is:
It seems to be a very concise and performant language that, in comparison to other new languages, does not try to cover multiple paradigms at once. However, it keeps its feature set as small as possible which leads to a fast learning curve and hopefully to a codebase that is easily understandable.

First, we need to setup our development environment. For this blogpost series I will use Windows, with Ubuntu on WSL and VSCode. This first blog post will focus on setting up this environment. If you work on LInux or Mac please make sure you have installed the golang compiler and git if you want to checkout the source code.

Setup steps:

1. Install Ubuntu on WSL (jfyi, how to move to WSL 2)

2. Start Ubuntu on WSL and install git and golang with ‘sudo apt install git golang-go’ (difference between apt and apt-get)

3. You can navigate to your Windows Folder with ‘cd /mount/c/Users/<username>/’. Here for example I cloned my fresh repository with ‘git clone https://github.com/hguercan/learn_golang’.

4. Install VSCode from the Windows Marketplace and install the Remote — WSL Extension to start VSCode inside of WSL.

5. Navigate to your wished source code folder with for example ‘cd learn_golang’ and try to start vscode with ‘code .’ Congratulations! We are ready for the next steps.

The next blogpost will focus on writing the first Hello World and Variables.

--

--