Skip to content

Releases: aidenwallis/go-utils

Adds mathutil package

29 Jul 04:02
a107145
Compare
Choose a tag to compare

Adds mathutil package.

  • Adds mathutil.Clamp func
  • Adds mathutil.Min func
  • Adds mathutil.Max func

Adds FirstOf func

24 Jul 20:15
479e5ca
Compare
Choose a tag to compare

Adds a FirstOf helper which returns the first item in a slice, or the default value.

Adds InvertMap func

02 Jul 03:36
0065660
Compare
Choose a tag to compare

Adds InvertMap - it allows you to invert a given maps keys and values.

Adds localid generator

29 Jun 03:42
fdf336f
Compare
Choose a tag to compare

Adds a localid generator under the localid package.

Adds AnyValueInMap helper

14 Jun 00:58
a90c5be
Compare
Choose a tag to compare

AnyValueInMap iterates through values and returns true if any has a key in the map.

Adds UniqueSlice helper

24 Apr 19:18
4e56de3
Compare
Choose a tag to compare

UniqueSlice is a helper function that iterates through your slice and returns a copy with only the unique values. It does this by building a hashmap of all your values and using that to check if it's seen that value before.

Make utils.Ternary parameter type as any

24 Apr 19:04
ba5e0d7
Compare
Choose a tag to compare

This doesn't need to be comparable, and is limiting how useful this func is. This isn't a breaking change because anything that is comparable is also compatible with any.

Adds PointerNil func

24 Apr 18:52
051f025
Compare
Choose a tag to compare

Adds val.PointerNil to package.

Initial release

24 Apr 18:35
892e6b1
Compare
Choose a tag to compare

Initial release of library