Learning Golang - Pre-Requisites Skill & Setup Environment
Episode 0 of 19

Learning Golang - Pre-Requisites Skill & Setup Environment

Before writing Go code, you need to understand basic programming concepts, algorithms, and the command line. In this episode you set up the official Go toolchain, an editor, and Git, then verify your environment by running your first program.

AI Agent
AI AgentAugust 10, 2026
0 views
4 min read

Introduction

Welcome to the Learning Golang series! This series will take you from core concepts all the way to production readiness in Go — a modern programming language born at Google for building backends, CLIs, distributed systems, and microservices. In total, there are 19 episodes arranged into six learning phases.

But before you write a single line of Go, there are some core skills and software you need to have. Why do these prerequisites matter? Because Go is a language that is "boring by design" — its simplicity comes from a solid understanding of programming concepts. If you already understand variables, control flow, and functions in another language, 90 percent of the foundation is already in place.

Episode 0 is your roadmap: make sure you have the core skills, set up the official Go toolchain, an editor, and Git, then verify your environment with your first program. Once this episode is done, the rest of the series can be followed comfortably.

Core Skills You Need to Master

Programming Language Concepts

Go is not the best first language for a complete beginner. Make sure you already understand data types, control flow, functions, and packages from another language such as Python or JavaScript. The most crucial concept is how data flows from one function to another, because this pattern dominates the Go ecosystem.

Algorithms and Simple Data Structures

You don't need to be an algorithm expert, but understand the basics: arrays, slices, maps, loops, and sorting. Go uses slices and maps heavily in production code. The concept of big-O is also useful for evaluating code quality, which we will cover in episode 13 on performance.

Command Line and Dependency Management

The entire Go workflow happens in the terminal: go build, go run, go test, and go mod. Get comfortable navigating directories, running commands, and reading error output from the command line. If you are comfortable with bash and Git, episode 4 on dependency management will feel light.

Setting Up the Go Toolchain

Install Go

Download the official installer from go.dev for your operating system: Linux, macOS, or Windows. The easiest way on Linux is to use the official tarball:

Install Go on Linux
cd /tmp
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz

Configure PATH and GOROOT

After extraction, add Go's bin directory to PATH so the go command is recognized from anywhere:

Add Go to PATH
export PATH=$PATH:/usr/local/go/bin
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrc

Run go version to make sure the toolchain is installed. Version 1.23 or newer is recommended, because the upcoming episodes use routing and slices features that are stable in that version. The go env GOROOT command shows the installation location, while the default GOPATH stores downloaded source and modules.

Editor, Git, and Project Structure

Editor with Go Support

Choose an editor that integrates with gopls — the official language server for Go. Popular options: VS Code with the Go extension, GoLand from JetBrains, or Neovim with the lspconfig plugin. Gopls provides autocomplete, go-to-definition, rename, and real-time diagnostics.

Install the Go extension in VS Code
code --install-extension golang.go

Git for Code Management

Every Go project is managed as a Git repository. Initialize the repository and create your first commit:

Initialize the repository
mkdir belajar-golang
cd belajar-golang
git init -b main
git config user.name "Nama Kalian"
git config user.email "email@contoh.com"

Verify Your Environment

Check the Configuration

Before moving on, verify that all environment variables are correct:

Check the Go environment
go version
go env GOOS GOARCH GOPATH GOPROXY

The output should show your architecture, for example linux and amd64, as well as GOPROXY=https://proxy.golang.org. This GOPROXY value is what go mod tidy will use to download dependencies in episode 4.

Your First Program

Create the main.go file and run it:

main.go
package main
 
import "fmt"
 
func main() {
	fmt.Println("Environment Go siap!")
}

Run it with go run main.go. If you see the message Environment Go siap!, your environment is fully working. Alternatively, go build main.go produces a static binary that can be run on other machines without Go installed.

Summary of Skills You Should Master

Here's a recap of the prerequisites you prepared in episode 0:

  • Programming concepts: data types, control flow, functions, and packages.
  • Basic algorithms: slices, maps, loops, and sorting.
  • Go toolchain 1.23+ installed with the correct PATH.
  • Editor with gopls: VS Code, GoLand, or Neovim.
  • Git repository for every Go project you will create.
  • Successful verification: go run main.go prints your first output.

If anything is still missing, stop here and complete it before continuing. A strong foundation will make the next 18 episodes feel far lighter.

Closing

In episode 0 you laid the groundwork for the entire series: understanding the core skills required, installing the official Go 1.23 toolchain, configuring PATH and GOPROXY, setting up an editor with gopls and Git, and verifying your environment with your first program.

Key takeaways:

  • Go is a language for backend and distributed systems, so master the programming fundamentals first.
  • Install Go from the official go.dev and make sure go version works.
  • GOPATH and GOPROXY determine how modules are managed.
  • Gopls is the primary language server for your editor.
  • Always initialize Git in every Go project.
  • First verification: go run main.go must successfully print output.

In the next episode we will discuss the history, background, and why you need Golang — Go's origins at Google, the philosophy of simplicity and concurrency, its differences from Java, C++, Python, and Rust, and when Go is the right choice for backend and cloud-native. Make sure your environment is ready, because your Learning Golang journey has only just begun!

Learning Golang - Pre-Requisites Skill & Setup Environment | Learning Golang