← All notes

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

Claims

Sources

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

License: CC-BY-4.0 · 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).

Cite this

Permanent ID: iil:note:2x033rny

iinventedlight. 2026. "Go goroutines and channels in brief." iinventedlight Library, iil:note:2x033rny, version of 2026-11-04. https://iinventedlight.com/library/notes/go-goroutines-channels/. License: CC-BY-4.0.

@misc{iil_note_2x033rny,
  author = {{iinventedlight}},
  title = {{Go goroutines and channels in brief}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-04},
  url = {https://iinventedlight.com/library/notes/go-goroutines-channels/},
  note = {Permanent ID iil:note:2x033rny. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/go-goroutines-channels.md.