{
  "schema_version": "1.0",
  "codex": "thecodex.expert/coding",
  "type": "language-reference",
  "slug": "languages/go",
  "name": "Go",
  "section": "Languages",
  "canonical_definition": "Go (Golang) is a statically typed, compiled, garbage-collected programming language designed at Google for simplicity, fast compilation, and built-in concurrency via goroutines and channels \u2014 used for cloud infrastructure, web services, and CLIs at scale.",
  "confidence": "high",
  "last_verified": "2026-06-01",
  "url": "https://thecodex.expert/coding/languages/go/",
  "current_version": "Go 1.26 (August 2024)",
  "created": "2012 (1.0)",
  "creators": "Robert Griesemer, Rob Pike, Ken Thompson (Google)",
  "typing": "static, strong, inferred",
  "execution": "native compiled (gc compiler, self-hosting)",
  "memory_management": "garbage collected (tricolour mark-sweep, concurrent, low-latency)",
  "concurrency": "goroutines + channels; M:N scheduler (G/M/P model); work stealing",
  "paradigms": [
    "procedural",
    "concurrent",
    "implicit OOP via methods on types"
  ],
  "critical_notes": {
    "no_classes": "No class keyword \u2014 structs + methods; composition via embedding, not inheritance",
    "implicit_interfaces": "Interfaces are satisfied implicitly \u2014 no implements keyword",
    "goroutines_not_threads": "Goroutines are NOT OS threads \u2014 M:N scheduled, ~2KB initial stack, millions possible",
    "error_handling": "No exceptions \u2014 errors are explicit return values; check err != nil pattern",
    "generics_1_18": "Generics added in Go 1.18 (March 2022); type parameters in square brackets",
    "loop_variable_fix": "Loop variable capture footgun fixed in Go 1.22 \u2014 goroutines in for loops now capture per-iteration value"
  },
  "version_milestones": {
    "1.0 (2012)": "Initial stable release",
    "1.5 (2015)": "Go compiler rewritten in Go (self-hosting); concurrent GC",
    "1.11 (2018)": "Go modules (go.mod) \u2014 official dependency management",
    "1.13 (2019)": "Error wrapping (fmt.Errorf %w, errors.Is, errors.As)",
    "1.18 (2022)": "Generics \u2014 type parameters, type constraints",
    "1.21 (2023)": "slices and maps packages in stdlib; min/max builtins",
    "1.22 (2024)": "Loop variable per-iteration semantics fixed",
    "1.23 (2024)": "Range over functions (iterators)"
  },
  "notable_projects": [
    "Docker",
    "Kubernetes",
    "Terraform",
    "Prometheus",
    "Grafana",
    "CockroachDB",
    "etcd",
    "Hugo"
  ],
  "sources": [
    {
      "num": 1,
      "citation": "The Go Team. The Go Programming Language Specification. go.dev/ref/spec.",
      "tier": 1
    },
    {
      "num": 2,
      "citation": "Donovan, A. A. A. & Kernighan, B. W. (2015). The Go Programming Language. Addison-Wesley.",
      "tier": 1
    },
    {
      "num": 3,
      "citation": "The Go Team. The Go Memory Model (revised 2022). go.dev/ref/mem.",
      "tier": 1
    },
    {
      "num": 4,
      "citation": "The Go Team. Go standard library documentation. pkg.go.dev/std.",
      "tier": 1
    },
    {
      "num": 5,
      "citation": "Go Blog. go.dev/blog/. \u2014 Official release posts.",
      "tier": 1
    }
  ]
}