Learnr

Learn Go

Learn the simple, fast language behind modern cloud tooling.

or browse all courses.

Free to start. Built from a single prompt. No credit card.

Go, often called Golang, is a compiled, statically typed language designed at Google for simplicity and fast builds. It has a deliberately small feature set, a built-in formatter, and lightweight concurrency through goroutines and channels. Many cloud tools are written in Go, including Docker and Kubernetes, and it is popular for web services, command-line tools and DevOps automation. Go programs compile to a single binary, which makes deployment simple. Learnr builds a personalized Go course from one prompt and teaches it through short, interactive lessons, from your first package main to concurrent servers.

How to learn Go, step by step

  1. Install Go and take the official tour. Install Go from go.dev, then work through A Tour of Go, which runs in the browser and covers the whole core language. Create a project with go mod init and run it with go run.
  2. Learn slices and maps thoroughly. Understand that a slice is a view over an array with a length and capacity, and how append can reallocate it. Practice maps, range loops and the comma-ok idiom for checking whether a key exists.
  3. Structure code with structs and interfaces. Attach methods to structs and learn that interfaces are satisfied implicitly, with no implements keyword. Small interfaces like io.Reader show how Go favors composition over inheritance.
  4. Handle errors the Go way. Go returns errors as values, so check if err != nil after calls that can fail and wrap errors with fmt.Errorf and %w for context. Resist using panic for ordinary failures.
  5. Practice concurrency on small problems. Start goroutines with the go keyword, pass results through channels, and wait for them with sync.WaitGroup. Run tests with the -race flag to catch data races early.
  6. Build a web service or CLI tool. Use net/http to build a small JSON API, or write a command-line tool that processes files, with tests in _test.go files. Short daily Learnr lessons help the idioms become second nature.

What you'll learn

  • Write Go programs with packages, functions, slices and maps
  • Model data with structs, methods and implicit interfaces
  • Handle errors idiomatically with returned error values
  • Run concurrent work with goroutines, channels and sync tools
  • Build and test a project with go mod, go test and go fmt

What's inside your Go course

A sample path Learnr builds for Go. Your real course adapts to your goal and level.

  • 1. Installing Go and the go command
  • 2. Types, slices, maps and control flow
  • 3. Functions, structs and methods
  • 4. Interfaces and error handling
  • 5. Goroutines, channels and concurrency patterns
  • 6. Building an HTTP service with the standard library

How long does it take to learn Go?

If you know another language, Go basics take 1 to 3 weeks because the language is small. Writing idiomatic, concurrent production code takes 2 to 4 months of steady practice. As a first language, allow 2 to 3 months for fundamentals.

What you need before you start

Go can be a first language, but it is most often learned after Python, JavaScript or Java. You need a terminal and the Go toolchain installed.

Common mistakes to avoid

  • Ignoring returned errors with the blank identifier to keep code short. Handle or return every error, adding context so failures are traceable.
  • Starting goroutines without a way to stop or wait for them, which leaks work. Use WaitGroups, channels or context cancellation to manage their lifetime.
  • Writing Go like Java with deep type hierarchies and getters everywhere. Keep packages small, interfaces tiny and code straightforward.

How Learnr builds your course

Type your topic

Tell Learnr you want to learn Go, or get as specific as you like.

Get a personalized course

Learnr instantly builds a full Go course tailored to your goal and skill level.

Learn and level up

Move through bite-sized lessons and interactive practice, earning XP and keeping your streak.

Go questions, answered

Is Go and Golang the same thing?

Yes. The language is officially called Go, and Golang is a nickname that comes from its original website domain. It makes the language easier to search for.

What is Go used for?

Go is widely used for backend web services, cloud and infrastructure tools, command-line utilities and networking software. Docker, Kubernetes and Terraform are well-known projects written in it.

Does Go have generics?

Yes. Generics were added in Go 1.18, letting you write type-parameterized functions and types. Idiomatic Go still uses them sparingly, preferring simple concrete code where it is clear.

Explore more courses

More programming and tech courses

See all programming and tech courses

Ready to learn Go?

Start your free, personalized Go course in seconds. .