Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.73 KB

README.md

File metadata and controls

53 lines (37 loc) · 1.73 KB

GoUtils

English | 中文

GitHub Action CodeCov GitHub Release Go Reference

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.

Installation

go get go.icytown.com/utils@latest

Usages

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.

License

GoUtils is distributed under the MIT License.