golang-samber-lo
golang samber lo
What it does
- github.com/samber/lo
- lo.samber.dev
- pkg.go.dev/github.com/samber/lo
- Type-safe generics — no interface{} casts, no reflection, compile-time checking, no interface boxing overhead
- Immutable by default — returns new collections, safe for concurrent reads, easier to reason about
- Composable — functions take and return slices/maps, so they chain without wrapper types
- Zero dependencies — only Go stdlib, no transitive dependency risk
Requirements & configuration
- Go's stdlib slices and maps packages cover ~10 basic helpers (sort, contains, keys). Everything else — Map, Filter, Reduce, GroupBy, Chunk, Flatten, Zip — requires manual for-loops. lo fills this gap:
- | Assuming lo.Filter modifies the input | lo is immutable by default — it returns a new slice | Use lom.Filter if you explicitly need in-place mutation |
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
golang-samber-lo FAQ
What does the golang-samber-lo skill do?
Functional programming helpers for Golang using samber/lo — 500+ type-safe generic functions for slices, maps, channels, strings, math, tuples, and concurrency (Map, Filter, Reduce, GroupBy, Chunk, Flatten, Find, Uniq, etc.). Core immutable package (lo), concurrent variants (lo/parallel aka lop), in-place mutations (lo/mutable aka lom), lazy iterators (lo/it aka loi for Go 1.23+), and experimental SIMD (lo/exp/simd). Apply when using or adopting samber/lo, when the codebase imports github.com/samber/lo, or when implementing functional-style data transformations in Go. Not for streaming pipelines (→ See `samber/cc-skills-golang@golang-samber-ro` skill). github.com/samber/lo lo.samber.dev
What does golang-samber-lo require?
Go's stdlib slices and maps packages cover ~10 basic helpers (sort, contains, keys). Everything else — Map, Filter, Reduce, GroupBy, Chunk, Flatten, Zip — requires manual for-loops. lo fills this gap: | Assuming lo.Filter modifies the input | lo is immutable by default — it returns a new slice | Use lom.Filter if you explicitly need in-place mutation |
How do I install golang-samber-lo?
Run: npx -y skills add https://github.com/samber/cc-skills-golang --skill golang-samber-lo --agent claude-code — the source lives at github.com/samber/cc-skills-golang.
Maintain golang-samber-lo?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/samber-cc-skills-golang-golang-samber-lo?ref=badge) npx agentictools info skills/samber-cc-skills-golang-golang-samber-lo The second line is the CLI lookup for this page — handy in READMEs and docs.