improve
This commit is contained in:
parent
179545f2bb
commit
acbcbf455f
|
@ -45,13 +45,15 @@ func FlushMapVal[T any](namespace string, key T) {
|
||||||
fn(key)
|
fn(key)
|
||||||
}
|
}
|
||||||
|
|
||||||
func FlushAnyVal(namespace string) {
|
func FlushAnyVal(namespaces ...string) {
|
||||||
|
for _, namespace := range namespaces {
|
||||||
fn, ok := callsM.Load(namespace)
|
fn, ok := callsM.Load(namespace)
|
||||||
if !ok {
|
if !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fn()
|
fn()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func GetAnyMapFnBys[K comparable, V, A any](namespace string, fn func(A) V) func(key K, args A) V {
|
func GetAnyMapFnBys[K comparable, V, A any](namespace string, fn func(A) V) func(key K, args A) V {
|
||||||
m := safetyMapFn[K, V, A](namespace)
|
m := safetyMapFn[K, V, A](namespace)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user