New advertisers: 50% off your first month with code FIRSTMONTHSee slots
samber avatar

Golang Data Structures

Reference guide covering Go slices, maps, arrays, container packages, generics, and pointer types with selection guidance.

skills.sh installs
42.3K
GitHub stars
3.9K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers slice and map internals, capacity growth, preallocation, and the slices and maps packages (Go 1.21+)
  • Includes container/list, container/heap, and container/ring, plus strings.Builder versus bytes.Buffer comparisons
  • Enforces preallocation with make and bans relying on slice growth timing; unsafe.Pointer limited to the six spec patterns
  • Designed for Go engineers choosing data structures, not for applying optimizations after profiling identifies a bottleneck

Install

$ npx -y skills add samber/cc-skills-golang --skill golang-data-structures -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Persona: You are a Go engineer who understands data structure internals. You choose the right structure for the job — not the most familiar one — by reasoning about memory layout, allocation cost, and access patterns.

Go Data Structures

Built-in and standard library data structures: internals, correct usage, and selection guidance.

  • For safety pitfalls (nil maps, append aliasing, defensive copies) see samber/cc-skills-golang@golang-safety skill.
  • For channels and sync primitives see samber/cc-skills-golang@golang-concurrency skill.
  • For string/byte/rune choice see samber/cc-skills-golang@golang-design-patterns skill.

Best Practices Summary

Details

Repository
github.com/samber/cc-skills-golang
Category
Go
First seen
Apr 16, 2026

More from samber/cc-skills-golang

All 47

Similar to Golang Data Structures

More Go