Go Language Reference

Go programming fundamentals. Types, interfaces, goroutines, channels, error handling, and tooling.

Topics

Topic Description

Basics

Variables, constants, control flow, formatting, zero values

Slices & Arrays

Slice operations, append, filtering, common patterns

Maps

Create, lookup, iterate, sets, group-by patterns

Structs

Struct definition, methods, embedding, tags

Interfaces

Implicit satisfaction, composition, type assertions

Goroutines

WaitGroup, Mutex, worker pools, context

Channels

Buffered/unbuffered, select, fan-in/fan-out, done pattern

Error Handling

error interface, wrapping, errors.Is/As, custom errors

Packages

Visibility, init, project layout, build commands

Modules

go.mod, dependency management, workspaces

Testing

Table-driven tests, benchmarks, test helpers

CLI Tools

Cobra, flag package, JSON output

JSON & HTTP

Marshal/unmarshal, HTTP server/client, file I/O