package
Version:
v0.1.3
Opens a new window with list of versions in this module.
Published: Sep 5, 2023
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func RegNameSpace(name any)
RegNameSpace 注册特定命名空间的唯一标识符
SonyflakeSetting 配置雪花id生成策略
func UnRegNameSpace(name any)
UnRegNameSpace 解除注销特定命名空间的唯一标识符
type Once[V any] struct {
}
Once 用于数据取值去重的结构体
NewOnce 创建一个用于数据取值去重的结构实例
func (slf *Once[V]) Get(key any, value V, defaultValue V) V
Get 获取一个值,当该值已经被获取过的时候,返回 defaultValue,否则返回 value
func (slf *Once[V]) Reset(key ...any)
Reset 当 key 数量大于 0 时,将会重置对应 key 的记录,否则重置所有记录
Source Files
¶
Click to show internal directories.
Click to hide internal directories.