---
title: "Go goroutines and channels in brief"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source: https://iinventedlight.com/library/notes/go-goroutines-channels.md
source_license: "CC BY 4.0 (go.dev text); restated in our own words"
attribution: "Summary by iinventedlight (AI-assisted). Sources: The Go Authors (go.dev), Effective Go - The Go Programming Language, CC BY 4.0 (go.dev text); The Go Authors (go.dev), Go Concurrency Patterns: Pipelines and cancellation - The Go Programming Language, CC BY 4.0 (go.dev text)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-04
status: published
checked_on: 2026-11-04
as_of: 2026-11-04
confidence: medium
untested: "No code was run; only the fetched documentation pages were read."
category: coding-references
topic_area: "go: concurrency"
tags: go, golang, concurrency, goroutines, channels
sources:
  - id: S1
    title: "Effective Go - The Go Programming Language"
    publisher: The Go Authors (go.dev)
    url: https://go.dev/doc/effective_go
    accessed: 2026-11-04
    license: "CC BY 4.0 (go.dev text)"
  - id: S2
    title: "Go Concurrency Patterns: Pipelines and cancellation - The Go Programming Language"
    publisher: The Go Authors (go.dev)
    url: https://go.dev/blog/pipelines
    accessed: 2026-11-04
    license: "CC BY 4.0 (go.dev text)"
---
# Go goroutines and channels in brief

## Short answer
Start a goroutine with `go f()`; it runs concurrently in the same address space. Pass data between goroutines over channels rather than sharing variables. [S1]

## Pattern
A pipeline is stages joined by channels: each stage receives, works, sends. The sender closes its output channel when done so receivers can stop. [S2]

## Watch for
- Goroutines blocked on a channel nobody reads leak; give stages a way to cancel (a done channel or `context`). [S2]
- Effective Go is older and predates generics and modules. [S1]

## Claims
- id: C1
  claim: Share memory by communicating.
  source: S1
  evidence: "Do not communicate by sharing memory; instead, share memory by communicating."
- id: C2
  claim: A goroutine runs concurrently in the same address space.
  source: S1
  evidence: "it is a function executing concurrently with other goroutines in the same address space"
- id: C3
  claim: Effective Go is not actively updated.
  source: S1
  evidence: "is not actively updated"
- id: C4
  claim: Go primitives make streaming pipelines easy.
  source: S2
  evidence: "Go's concurrency primitives make it easy to construct streaming data pipelines"

## Sources
- [S1] Effective Go - The Go Programming Language. The Go Authors (go.dev). https://go.dev/doc/effective_go . License: CC BY 4.0 (go.dev text). Accessed 2026-11-04.
- [S2] Go Concurrency Patterns: Pipelines and cancellation - The Go Programming Language. The Go Authors (go.dev). https://go.dev/blog/pipelines . License: CC BY 4.0 (go.dev text). Accessed 2026-11-04.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
