Go flashcards
Simple, fast servers and cloud tools that are easy to ship.
What is Go, in one plain sentence?
Go is a programming language for building fast, dependable server programs and tools, designed to be small enough to learn quickly.
Tap to turn over. Swipe right if you know it, left to see it again.
What you will learn
Start from zero
- What Go is and why it exists4 cards
- Key words4 cards
- Getting ready3 cards
Core basics
- Modules and the go tool2 cards
- Variables and types3 cards
- Functions and errors3 cards
- Control flow2 cards
- Slices and maps2 cards
- Structs and methods2 cards
- Pointers, strings and tests3 cards
Next steps
- Interfaces3 cards
- Errors in depth2 cards
- Goroutines, channels and context4 cards
- HTTP and JSON3 cards
- Generics and the standard library3 cards
- Project layout and tools2 cards
Go deeper
- Runtime and scheduler4 cards
- Concurrency patterns4 cards
- Iterators and generics in depth2 cards
- Performance3 cards
- Production and security4 cards
Final test and certificate
10 questions drawn fresh from the whole topic, about 15 minutes. Sign in, score 80% or more and get a free certificate with your name and a public check link anyone can open, such as an employer or a teacher. Not signed in? Try a practice test from the cards.
Take the final testAbout these cards
- Reviewed 26 October 2026
- CoversGo 1.27Go 1.26
Checked against
Go at a glance
Go is a simple programming language from Google for fast, reliable servers and tools that build into one file you can run anywhere.
Like a well-run restaurant kitchen: a short menu, clear rules, and many cooks (goroutines) working at once without getting in each other's way.
Words you will meet
- Compiler
- The tool that turns your Go code into a program file
- Package
- A folder of Go files that belong together, like a chapter of a book
- Module
- Your whole project with its name and the outside packages it uses
- Variable
- A named box that holds a value
- Type
- The kind of value a box holds, like a whole number or text
- Function
- A named set of steps that takes inputs and gives back results
- Struct
- A bundle of named values, like a form with fields
- Goroutine
- A very light worker that runs a function at the same time as others
The steps
- 1. Start from zero (11 cards): What Go is, where it runs and the words you need.
- 2. Core basics (17 cards): Modules, variables, functions, errors, loops, slices, maps, structs, pointers and tests.
- 3. Next steps (17 cards): Interfaces, errors in depth, goroutines, channels, context, HTTP, JSON, generics and tools.
- 4. Go deeper (17 cards): Scheduler, memory, GC, concurrency patterns, iterators, profiling and production.
All 11 cards in Start from zero
- What is Go, in one plain sentence?
- Go is a programming language for building fast, dependable server programs and tools, designed to be small enough to learn quickly.
- Why did Google create Go?
- In 2007 Google's huge C++ programs took ages to build and were hard to read. Robert Griesemer, Rob Pike and Ken Thompson designed Go for fast builds, simple code and easy multitasking.
- Where do you meet Go in daily life?
- Docker, Kubernetes and Terraform are written in Go, and so are backends at many payment, food delivery and streaming companies. If an app scales in the cloud, Go is often near.
- What is a goroutine, using a kitchen picture?
- A goroutine is like one more cook in the kitchen who works on a dish at the same time. Go can run thousands of these light cooks without slowing down.
- What are a package and a module?
- A package is a folder of Go files that work together, like one chapter. A module is the whole book: your project, its name and the outside packages it uses.
- What is a struct, in plain words?
- A bundle of named values, like a form with fields for name, phone and city. You fill one in for each customer.
- How does Go show that something went wrong?
- Functions hand back an extra result called an error. If it is empty, things went fine; if not, you decide what to do. No hidden jumps.
- What does it mean that Go builds one file?
- Go turns your whole program into a single runnable file that needs nothing else installed. You copy it to a server and it just runs.
- What do you need to start with Go?
- Download Go free from go.dev, open a terminal, and use any editor (many add a Go extension). Typing a few commands is the only skill you need.
- What does a first Go program look like?
- Every program starts in
package mainwith afunc main. You importfmtto print, thengo runbuilds and runs it. - What will you be able to do after this topic?
- Build real command-line tools and web services in Go, use goroutines safely, read cloud tools' source code, and handle Go interview questions.
Go cheatsheet
go command
go mod init example.com/appStart a modulego run .Build and rungo build -o app .Build a binarygo test ./... -race -coverTest all, race check, coveragego mod tidySync go.mod with importsgo vet ./...Find suspicious codeGOOS=linux GOARCH=arm64 go buildCross-compile
Syntax
x := 5 / var x intDeclare and set / zero valuefor i := range n {}Loop 0 to n-1for k, v := range m {}Loop over map or slicev, ok := m[key]Map lookup with presences = append(s, x)Grow a slicefunc (a *Acct) Pay() {}Method with pointer receiverdefer f.Close()Run at function return
Errors
if err != nil { return err }Pass the error upfmt.Errorf("load: %w", err)Wrap with contexterrors.Is(err, os.ErrNotExist)Match a known errorerrors.As(err, &target)Find an error typeerrors.Join(e1, e2)Combine errors
Concurrency
go f()Start a goroutinewg.Go(f); wg.Wait()Start and wait (1.25+)ch := make(chan T, n)Buffered channelselect { case v := <-ch: ... }Wait on several channelscontext.WithTimeout(ctx, d)Deadline for workvar mu sync.MutexGuard shared state
Standard library picks
slices.Sort / slices.ContainsSlice helpersmaps.Keys(m)Iterator over keysstrings.BuilderBuild text efficientlyhttp.NewServeMux()Router with methods and path valuesjson.Marshal / json.UnmarshalEncode and decode JSONslog.Info(msg, k, v)Structured logging