What problem does it solve?
This Skill helps you choose and use the right Go data structures with confidence, avoiding performance traps, memory waste, and incorrect tradeoffs in everyday engineering work.
Core Features & Use Cases
- Slices and maps: Preallocate correctly, reason about growth, avoid aliasing pitfalls, and pick the right value or pointer strategy.
- Standard containers: Use container/list, container/heap, and container/ring when their access patterns fit better than slices or custom code.
- Strings, generics, and pointers: Decide between strings.Builder and bytes.Buffer, design type-safe generic containers, and handle pointer semantics, unsafe usage, and weak references safely.
- Use case: When building a cache, scheduler, parser, or high-throughput API, this Skill helps you justify the data structure choice and produce idiomatic Go code that scales.
Quick Start
Use the golang-data-structures skill to review my Go use case and recommend the best data structure, with an explanation of the tradeoffs and an idiomatic implementation.