Version 2.2.2
Added new features and fixed/updated most documentation. Some minor bug fixes and performance improvements.
- new features:
- created the
infchan
package with functions allowing the creation of infinitely buffered channels - added synchronous rate limiting types to the
rl
package, with internal mutexing. - added
random.NewRandomizerRNG
, allowing for a custom RNG (*rand.Rand
) to be passed
- created the
- bug fixes:
- fixed an issue where
rl.Bucket#DrawMax
could draw a negative amount, effectively removing uses / increasing remaining buckets, ifForceDraw
previously overdrew
- fixed an issue where
- other changes:
- tests now create files in the OS temp directory (
os.TempDir()
) - modified some internal implementations
- improved speed of
security.OneTimeRunes
by using a map instead of indexing - minimally improved performance of some
rl.Bucket
operations
- improved speed of
- complete documentation refactoring
- added documentation where it was missing
- formatted existing documentation to central styles
- fixed errors in a couple places
- added a deprecation comment for
optional.Optional[T]#GetOrZero
in favor ofOrElseZero
- tests now create files in the OS temp directory (
- new features:
- added json marshalling and unmarshalling for type
optional.Optional[T]
- added
GetOrZero() T
method to typeoptional.Optional[T]
for naming consistency
- added json marshalling and unmarshalling for type
Updated library to Go 1.18, migrated to and created new generic types and functions.
- new features:
- java-style optional type
optional.Optional[T]
- generic slice fuzzy function
fn.FuzzySlice[T comparable](needle, haystack []T) bool
- java-style optional type
- converted functions and types to 1.18 generics:
random.Randomizer[T]{}
slices.Sum[T Integer | Float](s []T) T
slices.Average[T Float](s []T) T
-- still uses moving average to help prevent overflowrandom.SecureRunes
->random.SecureSlice[T ~rune | ~byte](length int, set []T) ([]T, error)
gotil is licensed under the MIT License