# Learn Go > Free Go tutorials, plus why Go is the highest-leverage language for agent-assisted development. Canonical: https://learn-go.org/ Licence: content free to read and quote with attribution to Learn Go (https://learn-go.org/). Maintainer: Code Learning Dojo. Last built 2026-09-06. ## Foundations The syntax and the mental model. Short, runnable, no fluff. - [Hello, World!](https://learn-go.org/hello-world/): Welcome to the first tutorial. In this tutorial you will learn how to write your first line of code. - [Variables](https://learn-go.org/variables/): A variable is a name given to a storage area that the programs can manipulate. - [Arrays](https://learn-go.org/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. - [Conditions and Switch](https://learn-go.org/conditions/): Go has one conditional statement and one switch, and both do more than their equivalents elsewhere. - [Loops](https://learn-go.org/loops/): Go has only one looping construct, the for loop. - [Functions](https://learn-go.org/functions/): Multiple return values, named results, variadics, closures — and the error convention that shapes every Go API. - [Slices and maps](https://learn-go.org/slices-and-maps/): The two data structures you will use constantly, and the aliasing behaviour that surprises everyone once. - [Structs and interfaces](https://learn-go.org/structs-and-interfaces/): Go has no classes and no inheritance. It has structs, methods and implicitly satisfied interfaces — which turns out to be enough. - [Errors](https://learn-go.org/errors/): Go's most distinctive design decision. Verbose, explicit, and the reason generated Go rarely swallows a failure. - [Methods and Pointers](https://learn-go.org/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. - [Goroutines and channels](https://learn-go.org/concurrency/): Go's headline feature, and the one place where the compiler stops protecting you. - [Strings and Runes](https://learn-go.org/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. - [Packages and Modules](https://learn-go.org/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. - [Defer, Panic and Recover](https://learn-go.org/defer-panic-recover/): Go's cleanup mechanism, its crash mechanism, and the narrow set of cases where catching a crash is the right thing to do. - [Testing](https://learn-go.org/testing/): Testing ships with the language. Table-driven tests, subtests, benchmarks and the race detector all come from one command. - [JSON and File I/O](https://learn-go.org/json-and-io/): Struct tags, the reader and writer interfaces that unify all I/O in Go, and the capitalisation mistake that silently drops your fields. - [Generics](https://learn-go.org/generics/): Type parameters arrived late to Go and the community uses them sparingly. Here is the everyday use, and why restraint is the right default. ## AI-Native Configuring agents, harnesses and feedback loops for this language. Updated as the tooling moves. - [Why Go is the best language for agent-assisted development](https://learn-go.org/ai/why-go/): Small spec, explicit errors, one formatter, a compiler that refuses to look away. Every property that made Go boring makes it exceptional to hand to a machine. - [Writing an AGENTS.md for Go](https://learn-go.org/ai/agents-md/): Go needs a shorter instructions file than any other language, because the compiler already enforces most of what you would otherwise write down. - [Testing Go that calls a language model](https://learn-go.org/ai/evals/): Go is increasingly the language the AI infrastructure is written in rather than the AI feature. That changes what you test — and interfaces plus httptest make it unusually pleasant. - [Tracking and cutting token costs in Go](https://learn-go.org/ai/tokenomics/): Go is usually the thing in front of the model rather than the thing calling it — which makes it the right place to enforce budgets, cancel abandoned work and expose the metrics. ## Review & Verify How generated code fails in this language, and the checks that catch it before your users do. - [The Go mistakes language models actually make](https://learn-go.org/review/failure-modes/): The compiler catches most of it. This is the list of what gets through — almost all of it concurrency. - [Dependency hygiene for Go modules](https://learn-go.org/review/dependencies/): Go's module system already solves most of what goes wrong elsewhere. What is left is hallucinated import paths, and the handful of directives that quietly disable the guarantees. - [Security review checklist for AI-generated Go](https://learn-go.org/review/security/): Go's standard library gets most things right by default, which means the vulnerabilities that survive are the ones where you chose the wrong stdlib package. - [The performance traps in generated Go](https://learn-go.org/review/performance/): Go's performance problems are almost all allocations and unbounded concurrency — and the toolchain will tell you about both if you ask it. ## Reference pages - [About Learn Go, and how we make money](https://learn-go.org/about/): Editorial policy, sourcing, corrections and affiliate disclosure for Learn Go, part of the Code Learning Dojo network. - [The Go stack we would set up today](https://learn-go.org/tools/): An opinionated Go toolchain for 2026: golangci-lint, staticcheck, goleak, the race detector, editors, and hosting — plus what to skip.