Back to browse
GitHub Repository

A small library of common channel architectures for Go, inspired by Rust

10 starsGo

Gochan – A library of channel architectures for Go, inspired by Rust

by andres·May 27, 2026·5 points·0 comments

AI Analysis

●●SolidBig BrainNiche Gem

Rust-style channel patterns fill gaps Go's native channels leave open.

Strengths
  • Seven specialized channel types Go doesn't provide natively
  • Watch channel with latest-value-only semantics is particularly useful
  • Clean API design familiar to Rust developers switching to Go
Weaknesses
  • Narrow audience of Go developers needing these specific patterns
  • Built-in Go channels handle most common use cases already
Target Audience

Go developers needing specialized channel patterns

Similar To

Go's built-in chan · Rust's std::sync::mpsc

Post Description

Hi All,

I felt like I was re-inventing the wheel by bolting similar channel architectures onto different Go structs repeatedly so I decided to extract some common types into into one library so that they would be easier to re-use:

- oneshot - spsc - spmc - mpsc - mpmc - broadcast - watch

The types are inspired by Rust channels so if you're coming from Rust they should feel familiar. So far I'm really enjoying using them but it'd be great to get some external feedback if you have time!

https://github.com/amorey/gochan

Andres

Similar Projects

AI/ML●●Solid

Contexa – Git-inspired context management for LLM agents

Git metaphor for agent memory is clever; execution and adoption remain unproven.

Big BrainWizardry
0x0003r
103mo ago
Infrastructure●●Solid

How do you reliably benchmark sub-100ns code paths in Rust

The project pairs algebraic correctness (commutative ops/CRDT ideas) with low-level tricks—SIMD Bloom-clock comparisons, BLAKE3 checkpointing and io_uring-backed durable admission—to chase genuine sub-microsecond admission cycles. The benchmarks and crate/docs suggest serious engineering, but the extreme nanosecond claims will need reproducible cross-platform verification and only apply when your workload's operations commute.

WizardryNiche Gem
yousef06
113mo ago