Go · Foundations

Learn Go

The syntax and the mental model. Short, runnable, no fluff.

Learn the Basics

01

Hello, World!

Welcome to the first tutorial. In this tutorial you will learn how to write your first line of code.

02

Variables

A variable is a name given to a storage area that the programs can manipulate.

03

Arrays

Arrays are essentially storage spaces that can be filled with as much data as one would like. Variables, unlike arrays, can only contain one piece of data.

04

Conditions and Switch

Go has one conditional statement and one switch, and both do more than their equivalents elsewhere.

05

Loops

Go has only one looping construct, the for loop.

06

Functions

Multiple return values, named results, variadics, closures — and the error convention that shapes every Go API.

07

Slices and maps

The two data structures you will use constantly, and the aliasing behaviour that surprises everyone once.

08

Structs and interfaces

Go has no classes and no inheritance. It has structs, methods and implicitly satisfied interfaces — which turns out to be enough.

09

Errors

Go's most distinctive design decision. Verbose, explicit, and the reason generated Go rarely swallows a failure.

10

Methods and Pointers

Pointers in Go are simple by design: no arithmetic, no manual freeing. The one decision you make repeatedly is value receiver or pointer receiver.

11

Strings and Runes

A Go string is a read-only slice of bytes, not characters. Understanding that distinction prevents a specific and common category of bug.

12

Packages and Modules

How Go code is organised, why a capital letter is the only access modifier you get, and what go.mod actually does.

Advanced Tutorials

Get the Go agent pack

A battle-tested AGENTS.md, the review checklist, and the failure-mode cheat sheet for Go. One email, then occasional updates when the tooling shifts. No course pitch.

Unsubscribe in one click. We never sell the list. Or just take the AGENTS.md now — no email needed.