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
- 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
- hashutil - hash functions and examples, e.g. md5, murmur3, etc
- reflectutil - functions based on golang reflect
- routinegroup - goroutine group, depends on ants, errgroup, etc
- filereader - read file (e.g. config) from json, yaml, toml, etc
- timeutil - functions based on golang time package
- requtil - http request utils
- sampling - a little wrap of downsampling package
- fileutil - file tools, e.g. absolute path, size, md5, etc
- excelutil - excel functions in practice based on qax-os/excelize
- reflectutil struct fold support more types: number, string, bool, slice, map, etc