Releases: aidenwallis/go-utils
Releases · aidenwallis/go-utils
v0.0.19: Build for go 1.21
v0.0.18: Adds factory.ChainableModifier
What's Changed
- adds
factory.ChainableModifier
by @aidenwallis in #25
Full Changelog: v0.0.17...v0.0.18
v0.0.17: Adds slice mutation utils
Adds `utils.ChunkSlice`
What's Changed
- Add go 1.20 to CI by @aidenwallis in #22
- add
utils.ChunkSlice
by @aidenwallis in #23
Full Changelog: v0.0.15...v0.0.16
Adds `utils.SliceFind`
- Adds utils.SliceFind, an easy way to linearly test for a given value in a slice for a given value and return it (or the zero value).
Adds utils.MapKeys and utils.MapValues
- Add utils.MapKeys and utils.MapValues (#19)
Add bitmask.Toggle
- Adds bitmask.Toggle, a way to conditionally add/remove a bit to a bitmask based on whether it already exists.
Adds bitmask utils, removes assert dependency
Adds bitmask utils, this is a generic package and any signed or unsigned integer is supported:
-
bitmask.Add()
-
bitmask.Has()
-
bitmask.Remove()
-
Removes dependency on
stretchr/testify
, reducing package size! -
Refactor CI pipeline a bit.
Adds utils.ValueAtIndex, utils.IndexInSlice and val.Default
utils
utils.ValueAtIndex
to fetch the value (or default) value at the index of a given slice. This is panic safe, and will return abool
as the second return value to indicate whether the value existed in the slice.utils.IndexInSlice
returns a boolean that indicates whether a value exists at a given index in a slice.
val
val.Default
will return the default zero value for any given type parameter. This is just syntactical sugar on top of doingvar v T
Adds worker.UnbufferedPool
Adds worker.UnbufferedPool
, a simple wrapper for invoking goroutines and waitgroups together.