# thoas/go-funk

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/thoas-go-funk).**

4,939 stars · 277 forks · Go · MIT

## Links

- GitHub: https://github.com/thoas/go-funk
- awesome-repositories: https://awesome-repositories.com/repository/thoas-go-funk.md

## Description

go-funk is a functional programming library for Go that provides a set of helper functions to transform and query slices and maps. It enables a declarative coding style for collection manipulation and data transformation, reducing the need for repetitive manual loops.

The library implements higher-order functions for common operations, including mapping, filtering, and searching through data structures using predicates and callbacks. It includes utilities for detecting element existence and finding common elements between collections.

These capabilities are supported through generic-based type constraints and interface-driven type assertions to ensure operations work across diverse element types.

## Tags

### Programming Languages & Runtimes

- [Go Functional Programming Toolkits](https://awesome-repositories.com/f/programming-languages-runtimes/go-functional-programming-toolkits.md) — Provides a comprehensive functional programming toolkit for Go, enabling a declarative coding style.
- [Collection Utility Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/collection-utility-libraries.md) — Provides a set of helper functions to perform repetitive operations on slices and maps without manual loops.
- [Functional Slice Utilities](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-strings/string-slices/slice-manipulation-utilities/functional-slice-utilities.md) — Implements functional utilities to filter, map, and query Go slices.
- [Generic Type Constraints](https://awesome-repositories.com/f/programming-languages-runtimes/generic-types/generic-type-constraints.md) — Implements generic type constraints to allow functional operations across any slice or map type.
- [Go Data Mapping Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/go-data-mapping-libraries.md) — Offers mapping and conversion utilities to transform data between different Go native types.
- [Higher-Order Function Toolkits](https://awesome-repositories.com/f/programming-languages-runtimes/higher-order-function-toolkits.md) — Provides a toolkit of higher-order functions for mapping and transforming collection elements.
- [Element Search](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-type-utilities/array-element-finding/predicate-based-element-testing/element-search.md) — Provides functions to locate the first element in a collection that satisfies a matching criterion.
- [Collection Intersections](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-type-utilities/collection-intersections.md) — Provides capabilities to extract elements that appear in both provided collections. ([source](https://cdn.jsdelivr.net/gh/thoas/go-funk@main/README.md))

### Data & Databases

- [Predicate-Based Element Filtering](https://awesome-repositories.com/f/data-databases/array-element-modifiers/predicate-based-element-filtering.md) — Includes predicate-based filtering to remove elements from collections based on boolean functions.
- [Collection Search Utilities](https://awesome-repositories.com/f/data-databases/collection-utilities/collection-search-utilities.md) — Provides search utilities to locate elements within collections using predicates and callbacks.
- [Collection Manipulators](https://awesome-repositories.com/f/data-databases/data-manipulation-libraries/collection-manipulators.md) — Provides utilities for filtering, mapping, and transforming Go slices and maps.
- [Collection Item Existence Checks](https://awesome-repositories.com/f/data-databases/table-specifications/existence-verification/column-existence-checks/collection-item-existence-checks.md) — Includes utilities to determine if a collection contains a specific value or matching element. ([source](https://cdn.jsdelivr.net/gh/thoas/go-funk@main/README.md))
- [Set Intersections](https://awesome-repositories.com/f/data-databases/set-intersections.md) — Implements set intersection logic to find common elements between two slices.

### Part of an Awesome List

- [Development Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/development-utilities.md) — Common utility functions using reflection.
- [General Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/general-utilities.md) — Functional utility library for common operations.
- [General Utility Libraries](https://awesome-repositories.com/f/awesome-lists/devtools/general-utility-libraries.md) — Utility library for common collection operations.
