golang-samber-lo

Provide type-safe functional utilities for Go data transformations using samber/lo.

5|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/omarluq/og-template --skill golang-samber-lo-omarluq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-samber-lo
Source: https://github.com/omarluq/og-template/tree/main/.agents/skills/golang-samber-lo
Command: npx skills add https://github.com/omarluq/og-template --skill golang-samber-lo-omarluq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Go projects often accumulate boilerplate for data transformations on slices and maps. This Skill provides a curated, type-safe, generics-first toolkit based on samber/lo to simplify Map, Filter, Reduce, GroupBy, Flatten, Uniq, and related patterns with immutable-by-default semantics.

Core Features & Use Cases

  • Core transforms: Map, Filter, Reduce, GroupBy, Flatten, Uniq, Find, and error-aware variants.
  • Composition and ergonomics: composable, type-safe pipelines that minimize boilerplate in data-processing code.
  • Use Case: build data pipelines, normalize data, and transform configurations with readable, maintainable code.

Quick Start

Install the module and start composing readable transforms with lo to convert, filter, and aggregate collections.

Frequently Asked Questions about golang-samber-lo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write type-safe Map and Filter functions in Go without boilerplate?

Type-safe Map and Filter functions in Go are implemented using generics to eliminate boilerplate. This skill provides functional utilities based on samber/lo to handle these slice and map transformations with immutable-by-default semantics.

What is the best way to build a data pipeline in Go using functional programming?

Building a data pipeline in Go using functional programming is best achieved with composable, type-safe utilities. This skill provides Map, Filter, Reduce, and GroupBy functions to normalize data and transform configurations while minimizing boilerplate.

Does Go support immutable data transformations for slices and maps?

Go supports immutable data transformations for slices and maps through generics-first toolkits. This skill enforces immutable-by-default semantics using samber/lo to ensure data transformations do not mutate original collections.

How do I handle errors during a Reduce or Map operation in Go generics?

Handling errors during a Reduce or Map operation in Go generics requires error-aware variants of standard functional patterns. This skill provides error-aware utilities to safely propagate errors during data pipeline transformations.

Can I group or chunk slice elements in Go without writing custom loops?

You can group or chunk slice elements in Go without custom loops by using generics-first functional utilities. This skill offers GroupBy and Chunk functions to organize collections cleanly without manual iteration boilerplate.

When should I use samber/lo instead of writing standard Go for-loops?

You should use samber/lo instead of standard Go for-loops when building complex data pipelines or configuration transforms. It provides type-safe, composable functions like Flatten and Uniq that improve readability and maintainability over manual iteration.