Skip to the workspace
Pebellslearn by building
Introduction to Go  ›  Lesson

Why Go, and Where It Came From

Why use Go 10 minGo was designed at Google to keep large programs simple to read, quick to compile and easy to run concurrently, and it has stayed deliberately small and backwards compatible since version 1.0.

Set up Go and run your first file

Install the Go toolchain and create your first module. A module groups Go code and records its dependencies; this first one needs no external packages.

Already set up? Continue to the lesson

New to coding? Meet the tools and find the terminal
Go toolchain
The go command builds, runs, formats and tests Go programs.
Module
A project with a go.mod file identifying it and its dependencies.
Text editor
Saves .go source files.

A terminal is a window for commands. Its shell interprets those commands. PATH is the list of folders the shell searches for programs. An editor extension adds editing help; it usually does not install the language itself.

In VS Code, open your project folder, then choose View → Terminal. Type at the cursor in the Terminal panel, not in Output, the source file, or the browser address bar. Our command blocks omit prompt symbols such as $ and >; do not add them.

Official VS Code screenshot: the Terminal tab is selected below the editor, with the PowerShell shell name at the right and a command prompt at the left.
Find the Terminal tab and shell name. Open full-size screenshot (new tab).

The dropdown next to the plus button selects a shell. Choose the shell named in your operating-system instructions below. Available choices depend on what you installed.

Official VS Code screenshot: the arrow beside the terminal plus button opens a list containing PowerShell, Command Prompt, Git Bash and Ubuntu WSL.
Official documentation screenshots by Microsoft, VS Code terminal guide, CC BY 3.0 US. Unmodified; your version may look different.

Choose a system to see its installation steps. A computer is needed for these local setup instructions.

Official documentation and illustrated guides

Instructions reviewed 2026-10-27. Use the linked installer page for current versions and supported operating systems.

Continue to the lesson

golang / Why Go, and Where It Came From

Explore each scene at your own pace.

01 · The rule

The rule

Why Go, and Where It Came From

Go was designed at Google to keep large programs simple to read, quick to compile and easy to run concurrently, and it has stayed deliberately small and backwards compatible since version 1.0.

Connect Go's language and tooling choices to the kinds of programs they simplify.

Imagine you want to give colleagues a tool called tally that counts the words in any text file. Some use Windows, some use Macs, and none of them want to install a language runtime first. That wish, "one file that just runs, built from code anyone can read", is close to the reason Go exists. tally is also the program you will grow, piece by piece, through this whole course.

The rule

Go trades clever features for fast builds, plain code and easy concurrency.

Go was started in 2007 at Google by Robert Griesemer, Rob Pike and Ken Thompson. They were tired of huge programs that took ages to compile and were hard for new team members to read. It became open source in 2009, and Go 1.0 arrived in 2012 with a promise that still holds: code written for Go 1 keeps compiling on every later Go 1 release. New versions arrive about twice a year and add carefully, for example generics (2022) or looping over a plain number with range (2024).

Each part of the rule is a design choice:

  • Fast builds: the compiler is quick even on large projects, and it produces a single native binary with no virtual machine to install. It can also cross-compile: build a Windows tally.exe on a Mac.
  • Plain code: few keywords, one official formatting style (gofmt), and no feature that lets two teams write the same thing in wildly different ways. Code you did not write still looks familiar.
  • Easy concurrency: goroutines (very cheap threads) and channels are built into the language, which is why so many servers and cloud tools use Go. Docker, Kubernetes and Terraform are all written in it.

Garbage collection means you rarely think about freeing memory, while static types catch mistakes at compile time rather than in front of a user.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.