
Option, Result, and Either with generic methods for chaining across types.
go get github.com/luminyra/fpGo 1.27+ · 8 standalone modules · Zero dependencies
Functional containers, lazy collections, structured errors, dependency injection, caching, reactive streams, and slog extensions. Each relies only on the standard library. Examples come from source, with output verified by go test.


Option · Unwrap an optional value with a fallback
ports := map[string]string{"http": "80"}
port, ok := ports["https"]
fmt.Println(fp.OptionOf(port, ok).Or("443"))443$ go test -run Example
ok github.com/luminyra/fpEach library is a standalone Go module. Import only what you need.

Option, Result, and Either with generic methods for chaining across types.
go get github.com/luminyra/fp
Lazy, chainable Seq and collection helpers that complement slices, maps, and iter.
go get github.com/luminyra/coll
Structured errors for log/slog with typed keys, stack traces, and panic recovery.
go get github.com/luminyra/errs
Failover, routing, middleware, attribute formatting, sampling, and HTTP logging for log/slog.
go get github.com/luminyra/sl
Type-safe dependency injection with resolution by type and shutdown in reverse construction order.
go get github.com/luminyra/ioc
In-memory caching with LRU, LFU, FIFO, jittered TTLs, batch loading, and background refresh.
go get github.com/luminyra/memo
Retries, circuit breakers, and timeouts for calls to dependencies, nested as closures with errors returned unchanged.
go get github.com/luminyra/resil
ReactiveX-style streams with chainable operators, range iteration, and context support.
go get github.com/luminyra/rx
Go 1.27+
Zero dependencies
Iterators
Source examples
Run your first example in a few minutes with a quickstart, then explore the guides.