# golang-data-structures

> Claude/Codex skill by [@samber](https://omgskills.com/library/samber/index.md) · 2.8k stars · 38k installs · Updated 2026-08-01

Golang data structures — slices (internals, capacity growth, preallocation, slices package), maps (internals, hash buckets, maps package), arrays, container/list/heap/ring, strings.Builder vs bytes.Buffer, generic collections, pointers (unsafe.Pointer, weak.Pointer), and copy semantics. Use when choosing or optimizing Go data structures, implementing generic containers, using container/ packages, unsafe or weak pointers, or questioning slice/map internals.

Tags: agent, agent-skills, ai, antigravity, claude, claude-code, code, codex, coding, copilot, cursor, gemini, gemini-cli-extension, openclaw, opencode, plugin, skills, skillsmp, vibe-coding

## Install

```sh
git clone https://github.com/samber/cc-skills-golang /tmp/cc-skills-golang && ln -s /tmp/cc-skills-golang/skills/golang-data-structures ~/.claude/skills/golang-data-structures
```

## From README

Go Data Structures Built-in and standard library data structures: internals, correct , 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.

## Links

- HTML page: https://omgskills.com/skills/samber/cc-skills-golang/golang-data-structures/
- GitHub: https://github.com/samber/cc-skills-golang
- Author: [@samber](https://omgskills.com/library/samber/index.md)

## More from this repo

- [golang-google-wire](https://omgskills.com/skills/samber/cc-skills-golang/skills/golang-google-wire/index.md) — Compile-time dependency injection in Golang using google/wire — wire.NewSet, wire.Build, wire.Bind...
   - [@samber](https://omgskills.com/library/samber/index.md) · 3.1k stars
- [golang-gopls](https://omgskills.com/skills/samber/cc-skills-golang/skills/golang-gopls/index.md) — Golang semantic code intelligence via \`gopls\`, the official Go language server — go-to-definition, find references,...
   - [@samber](https://omgskills.com/library/samber/index.md) · 3k stars
- [golang-how-to](https://omgskills.com/skills/samber/cc-skills-golang/skills/golang-how-to/index.md) — Golang skills orchestrator — always active on any Golang coding, review, debug, or setup task.
   - [@samber](https://omgskills.com/library/samber/index.md) · 3k stars
