🎁 Get the FREE AI Skills Starter GuideSubscribe →
BytesAgainBytesAgain
🦀 ClawHub

Golang Samber Lo

by @samber

Functional programming helpers for Golang using samber/lo — 500+ type-safe generic functions for slices, maps, channels, strings, math, tuples, and concurren...

Versionv1.0.3
Installs1
📋 Tips & Best Practices

1. Prefer stdlib when availableslices.Contains, slices.Sort, maps.Keys carry no dependency. Use lo for transforms the stdlib doesn't offer (Map, Filter, Reduce, GroupBy, Chunk, Flatten) 2. Compose lo functions — chain lo.Filterlo.Maplo.GroupBy instead of writing nested loops. Each function is a building block 3. Profile before optimizing — switch from lo to lom/lop only after go tool pprof confirms allocation or CPU as the bottleneck 4. Use error variants — prefer lo.MapErr over lo.Map + manual error collection. Error variants stop early and propagate cleanly 5. Use lo.Must only in tests and init — in production, handle errors explicitly

View on ClawHub
TERMINAL
clawhub install golang-samber-lo

🧪 Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

🔍 Can't find the right skill?

Search 60,000+ AI agent skills — free, no login needed.

Search Skills →