What problem does it solve?
This Skill helps you choose and use the right Go data structure for each access pattern, avoiding aliasing bugs, unnecessary allocations, and inefficient container choices.
Core Features & Use Cases
- Slice and map correctness: Understand header copying, aliasing, cloning, append behavior, and safe preallocation.
- Performance-oriented selection: Pick slices, maps, arrays, strings.Builder, bytes.Buffer, or container/* types based on the workload.
- Modern Go helpers: Apply the slices and maps standard packages for cloning, searching, sorting, deletion, and growth.
- Use case: When building an API response, you can choose empty slices for JSON output, clone shared data before returning it, and pre-size maps and slices to reduce reallocations.
Quick Start
Ask the skill to review your Go data structure choice for the current code and recommend the safest, most efficient slice, map, string, or container pattern.