Skip to content

Utility for Golang 1.21+, with generic, by MegaShow / MegaShow 的 Golang 工具库,基于 Go 1.21 和泛型能力

License

Notifications You must be signed in to change notification settings

MegaShow/goutils

Repository files navigation

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.

About

Utility for Golang 1.21+, with generic, by MegaShow / MegaShow 的 Golang 工具库,基于 Go 1.21 和泛型能力

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages