
Golang Data Structures
This is your reference when you need to think about Go data structure internals rather than just reaching for the first thing that works. It covers slice capacity growth mechanics, map bucket implementation, when to actually use container/heap or container/ring, and the strings.Builder versus bytes.Buffer question. The real value is in the preallocation guidance and the unsafe.Pointer patterns, which follow the six valid conversions from the spec. If you're writing generic collections or trying to decide whether a weak pointer makes sense for your cache, the examples are concrete. Pairs well with the golang-safety skill from the same author for the aliasing and nil map traps.
- skills.sh installs
- 41.8K
- GitHub stars
- 3.8K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-data-structures --agent claude-codeInstalls into .claude/skills of the current project.
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-safetyskill. - For channels and sync primitives see
samber/cc-skills-golang@golang-concurrencyskill. - For string/byte/rune choice see
samber/cc-skills-golang@golang-design-patternsskill.
Best Practices Summary
Sponsors
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Rust, Go
- First seen
- Apr 16, 2026
More from samber/cc-skills-golang
All 47- Golang Troubleshooting41.6K
- Golang Observability41.5K
- Golang Dependency Management41.4K
- Golang Structs Interfaces41.3K
- Golang Cli41.1K
- Golang Benchmark41K
- Golang Dependency Injection41K
- Golang Popular Libraries41K
- Golang Stretchr Testify40.9K
- Golang Continuous Integration40.9K
- Golang Grpc40.7K
- Golang Samber Lo40K
- Golang Stay Updated40K
- Golang Samber Do39.8K
- Golang Samber Slog39.8K
- Golang Samber Oops39.7K
- Golang Samber Mo39.7K
- Golang Samber Hot39.7K
- Golang Samber Ro39.6K
- Golang Spf13 Cobra38.6K
- Golang Swagger38.6K
- Golang Graphql38.5K
- Golang Google Wire38.3K
- Golang Spf13 Viper38.3K