English | 中文
English version is translated by tool.
go.icytown.com/utils
is MegaShow's Golang tool library, based on Go 1.21 and type generic. It implements common data structures, tools, cache and etc.
go get go.icytown.com/utils@latest
For details, please refer to GoDoc。
GoUtils provides the following tools.
Package | Functions or Data Structures |
---|---|
ucond | If, IfFunc, Not |
ucrypto | MD5Hex, SHA1Hex, SHA256Hex, SHA512Hex |
umath | CeilFloat, FloorFloat, RoundFloat |
uobject | Default, Indirect, IndirectOr, IsNotZero, IsZero, Ptr |
uruntime | GetFuncFullName, GetFuncName |
uslice | Find, FindLast, Filter, GroupBy, Map, Of, ToMap, Unique, UniqueFunc |
usync | Singleflight |
uversion | SemVer |
GoUtils alse provides some commonly used containers.
Package | Containers |
---|---|
maps | SyncMap |
pools | Pool |
sets | HashSet |
stacks | ArrayStack |
tuples | Pair, Triple |
In addition, GoUtils alse provides some implementation of cache.
- SimpleCache (Experimental):a simple cache implementation based on map.
GoUtils is distributed under the MIT License.