samber/lo

Description: 💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 3 hours ago
Added to GitGenius on June 23rd, 2026
Created on March 2nd, 2022
Open Issues & Pull Requests: 213 (+0)
Number of forks: 944
Total Stargazers: 21,385 (+0)
Total Subscribers: 74 (+0)

Issue Activity (beta)

Open issues: 43
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 662 days
Stale 30+ days: 40
Stale 90+ days: 37

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 1
Events in 7 days: 1

Top labels

  • breaking change (10)
  • iterator (10)
  • bug (2)
  • spec (2)
  • blocked (1)

Most active issues this week

Repository Insights (GitGenius)

Median issue/PR response: 9.2 hours
Mean response time: 51.1 days
90th percentile: 150.2 days
Tracked items: 114

Most active contributors

Detailed Description

The lo repository is a Go utility library that brings Lodash-style functional programming helpers to Go 1.18 and later versions, leveraging Go's generics system for type-safe operations. The library provides dozens of helper functions designed to simplify common coding tasks when working with slices, maps, strings, channels, and functions, making code more readable and reducing boilerplate.

The library is organized around several functional programming paradigms. For slices, it offers operations like Filter, Map, FlatMap, Reduce, GroupBy, Chunk, Window, Flatten, and many others for transforming and manipulating sequential data. For maps, it provides Keys, Values, PickBy, OmitBy, MapKeys, MapValues, and similar operations for working with key-value pairs. The library also includes mathematical helpers such as Range, Clamp, Sum, Product, and Mean, along with string manipulation functions like CamelCase, SnakeCase, PascalCase, and Capitalize.

Beyond basic collection operations, lo includes advanced features for concurrency and asynchronous programming. It provides helpers like Attempt, AttemptWhile, Debounce, Throttle, Synchronize, Async, and WaitFor for managing concurrent operations and timing-related patterns. The library also supports channel operations through ChannelDispatcher, SliceToChannel, ChannelToSlice, Generator, Buffer, FanIn, and FanOut, enabling functional composition with Go's channel primitives.

Error handling is a first-class concern in lo, with utilities like Validate, Must, Try, TryCatch, and Assert providing multiple strategies for managing errors in functional pipelines. The library includes type manipulation helpers such as ToPtr, FromPtr, IsNil, IsNotNil, and Coalesce for working with pointers and optional values. Intersection and search operations like Contains, Every, Some, Intersect, Difference, Union, Find, IndexOf, Min, Max, and Sample provide comprehensive collection querying capabilities.

According to GitGenius activity tracking, the repository has received consistent maintenance with a median issue and pull request response latency of 9.2 hours across 113 tracked items. The primary maintainer is samber with 173 recorded events, followed by contributors d-enk and FGasper. The most frequently discussed topics involve breaking changes and iterator functionality, with 10 issues each tagged with these labels. The repository maintains strict semantic versioning and commits to no breaking changes in exported APIs before version 2.0.0, except for experimental packages under the exp directory.

The library has no external dependencies beyond the Go standard library, making it lightweight and easy to integrate. While some helpers overlap with functions in Go's standard library packages like slices and maps, the library provides significantly more abstractions and a cohesive functional programming interface. The repository is classified across multiple domains including utility functions, generics, functional programming, collections, data manipulation, and type safety, reflecting its broad applicability to Go development patterns.

lo
by
sambersamber/lo

Repository Details

Fetching additional details & charts...