Registry / utility / thoas-go-funk

thoas-go-funk

JSON →
library0.9.3gogounverified

A Go library providing generic functions for slices, maps, and other collections, inspired by functional programming.

go get github.com/thoas/go-funk
INSTALL
IMPORT
SIG · THOAS-GO-FUNK
T
thoas-go-funk
utilitygov0.9.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

funk
github.com/thoas/go-funk

Filter a slice of integers to keep only even numbers.

package main import ( "fmt" "github.com/thoas/go-funk" ) func main() { numbers := []int{1, 2, 3, 4} evens := funk.Filter(numbers, func(x int) bool { return x%2 == 0 }) fmt.Println(evens) }
Debug
Known issues
gotchago-funk uses reflection for generic operations, which may impact performance on large datasets.
fix
Consider using Go 1.18+ generics or hand-written loops for performance-critical code.
affects: all
Upgrade
Version history
0.9.3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
thoas-go-funk — go get thoas-go-funk · libregistry