Learn Go by building.

Learn Go with courses, exercises and real-world projects

Learn Go with structured courses, practical exercises and real-world projects.

Learning path

Beginner

Get started with Go

Install Go, write your first program and learn the basics: variables, conditionals, loops, functions and slices.

Intermediate

Structure your code

Master maps, structs, methods, interfaces and error handling to write idiomatic Go.

Advanced

Go further

Explore concurrency with goroutines and channels, then build a tested REST API.

Explore by category

Beginner

Your first Go program

Create a Go module, write a runnable Hello World in main.go, then run and build it while learning package main, imports and the func main entry point.

11 min read

Beginner

Introduction to Go

Discover what the Go programming language is, its origins at Google, its strengths for cloud and network services, and the traits that define it.

9 min read

Beginner

Variables and types in Go

Learn how to declare and use variables in Go with var, the short := operator, type inference and zero values, with runnable examples.

12 min read

Recently updated

  • Arrays and slices in Go

    Understand arrays and slices in Go: slice literals, len and cap, append, slicing, make, ranging, and how slices share a backing array.

  • Conditionals in Go

    Learn to control the flow of a Go program with if, else if and else, the if-with-statement form, and switch, with clear runnable examples.

  • Error handling in Go

    Learn idiomatic error handling in Go: the error interface, returning and checking errors, errors.New, wrapping with %w, errors.Is and errors.As.

  • Your first Go program

    Create a Go module, write a runnable Hello World in main.go, then run and build it while learning package main, imports and the func main entry point.

How LearnGoLab works

A guided path

Every lesson lists its prerequisites and the recommended next step, from your first program to a REST API.

Tested code

Complete examples are formatted with gofmt and checked automatically: they compile and run.

No distractions

No ads, no trackers, no account required. The content reads even without JavaScript.

Who writes LearnGoLab

Search

Search runs entirely in your browser.