Awesome
just
This project contains features that help make the noisy stuff in every project.
- Filter slices, maps.
- Applying functions to collections.
- Null[any] for optional fields in API and sql.DB queries.
Most helpful functions
SliceIter
allows you to iterate over slice with specialIterContext
that provide some methods likeIsFirst
,IsLast
SliceMap
andSliceMapErr
allow you to map a slice to another one. Useful for adapters.NewPool
sync.Pool
with genericsChanAdapt
allows to create an adapted version of channelContextWithTimeout
runs a function with context and timeoutErrAs
helps to handle an errorsSliceChunk
iterates over chunksSliceChain
joins slices to oneStrSplitByChars
splits the string by symbols
Examples
This library contains a bunch of functions. Please see pkg.go.dev for examples.