Skip to content

Glossary

Quick definitions, A to Z. Each term is explained in depth in its guide; this is the reminder card.

  • Blank identifier (_) — discards a value. Required when you intentionally ignore something (unused variables are errors).
  • Channel — Go's way for goroutines to communicate safely. Beyond these guides' scope; the Go tour covers concurrency well.
  • Defer — schedules a call for when the surrounding function returns. See Control Flow.
  • Embedding — placing one struct inside another to compose behavior. See Structs and Methods.
  • Error — a value (not an exception) signaling failure, always the last return value. See Error Handling.
  • Exported — visible outside its package: any name starting with a capital letter.
  • go.mod — the file marking a folder as a Go module (project).
  • gofmt — the official code formatter. One style, no debates.
  • Goroutine — a lightweight thread, started with go. Thousands are cheap; the runtime multiplexes them onto OS threads.
  • Interface — a set of method signatures; types satisfy it implicitly. See Interfaces.
  • Map — key-value lookup table. See Variables and Types.
  • Method — a function with a receiver, attached to a type.
  • Module — a Go project: a folder with a go.mod file.
  • Nil — Go's "nothing here" value for pointers, maps, slices, interfaces, and more.
  • Package — a folder of Go files compiled together; the unit of organization and privacy.
  • Panic — an intentional crash. For bugs, not expected failures.
  • Range — iterates a slice, map, or channel with for.
  • Receiver — the (u User) part of a method declaration, attaching it to the type.
  • Rune — one Unicode character ('a', '🦀').
  • Slice — a growable list ([]int). Always assign back the result of append.
  • Struct — a named bundle of fields. Behavior attaches via methods.
  • Unexported — visible only inside its package: any name starting with a lowercase letter.
  • Variadic — a function taking any number of trailing arguments (...int).
  • Zero value — every variable's default: 0, "", false, or nil. No uninitialized variables exist.