Learn GoGo Basics
0 / 22 lessons complete
GO BASICSLESSON 01

Intro & Setup

Go (or Golang) is a fast, simple, statically typed language created at Google. Let’s see what makes it special and get it installed.

IN THIS LESSON

Know what Go is good at, install the toolchain and learn the three commands you’ll use every day.

Why Go?

Go was designed at Google in 2007 by Robert Griesemer, Rob Pike and Ken Thompson, and released in 2009. It compiles to a single native binary, so programs start instantly and run fast — while the syntax stays small enough to learn in a weekend.

Key traits

  • Compiled — your code becomes machine code before it runs.
  • Statically typed — every variable has a type, checked at compile time.
  • Garbage collected — no manual memory management.
  • Built for concurrency — goroutines and channels are part of the language.
  • Opinionated tooling — gofmt formats everyone’s code the same way.

Installing Go

Download the installer for your OS from go.dev/dl, run it, then open a new terminal and check it worked. In VS Code, install the official Go extension for autocomplete and formatting.

terminal
$ go version
go version go1.23.0 darwin/arm64

$ go mod init myapp   # start a new module (creates go.mod)
$ go run main.go      # compile + run in one step
$ go build            # compile into an executable file

You don’t need anything installed to follow this course — the editor on the right compiles your code in the official Go Playground sandbox.

YOUR TURN · IN THE EDITOR →

Coding challenge

Change the message so the program prints exactly Go is installed and ready! — then press Run tests.

Passes when the output matches the Tests tab.

CHECK YOUR UNDERSTANDING

Lesson quiz

4 random questions from this lesson. Get 3 right to pass.

  • Pass the coding challenge
  • Pass the quiz
01 / 22

LEARN BY DOING

Browser playground

Go sandbox
intro-setupGo Playground
No setup needed
OUTPUT

$ Your output will appear here.

Your code is compiled and run in the official Go Playground sandbox.