utils

module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2024 License: MIT

README

GoUtils

GitHub Action CodeCov GitHub Release Go Reference

go.icytown.com/utils 是 MegaShow 的 Golang 工具库,基于 Go 1.21 和泛型能力,实现了常用的数据结构、工具、缓存封装等。

安装

go get go.icytown.com/utils@latest

使用

详细的使用说明请查阅 GoDoc

GoUtils 提供了以下工具库。

工具库 函数
ucond If, IfFunc
ucrypto MD5, SHA512
umath CeilFloat, FloorFloat, RoundFloat
uobject Default, Indirect, IndirectOr, IsNotZero, IsZero, Ptr
uruntime GetFuncFullName, GetFuncName
uslice Distinct, Find, Filter, GroupBy, Map, ToMap
usync Singleflight

GoUtils 还提供了一些常用的容器封装。

容器库 容器
maps SyncMap
sets HashSet
stacks ArrayStack
tuples Pair, Triple

除此之外,GoUtils 还提供了一些常用的缓存封装。

  • SimpleCache (实验性):基于 map 的简单缓存实现。

协议

GoUtils 基于 MIT 协议开源。

Directories

Path Synopsis
Package caches provides some cache implementation.
Package caches provides some cache implementation.
containers
sets
Package sets implements sets of different type, such as [HashSet].
Package sets implements sets of different type, such as [HashSet].
stacks
Package stacks implements stacks of different type, such as [ArrayStack].
Package stacks implements stacks of different type, such as [ArrayStack].
Package ucond provides utils of condition.
Package ucond provides utils of condition.
Package ucrypto provides utils of crypto.
Package ucrypto provides utils of crypto.
Package umap provides utils of map.
Package umap provides utils of map.
Package umath provides utils of math.
Package umath provides utils of math.
Package uobject provides utils of variable.
Package uobject provides utils of variable.
Package uruntime provides utils of runtime.
Package uruntime provides utils of runtime.
Package uslice provides utils of slice.
Package uslice provides utils of slice.
Package usync provides some functions and groups for sync call.
Package usync provides some functions and groups for sync call.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL