This projects provides many Golang tools for reference.
Most packages supports generics, which needs Golang version >= 1.18.
To use tools in this project, just go get the project and import the packages:
go get github.com/latavin243/goutils
utils without dependency
set - a set implementation with generics
strcase - convert between camelCase, snake_case, TitleCase, etc
fnwrap - wrap a func with additional functions
iterop - operation funcs for iterables, e.g. map, flatmap, etc
number - number conversion, etc
roundrobin - round-robin balancing
stopwatch - a stopwatch to get time duration elapsed
ringbuffer - ring buffer with generics
ringhash - ring hash for consistent hashing
eventbus - message event bus for pub/sub, producer/consumer
utils based on other packages
hashutil - hash functions and examples, e.g. md5, murmur3, etc
reflectutil - functions based on golang reflect
routinegroup - goroutine group, depends on ants, errgroup, etc