MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / onceMigrate

Function onceMigrate

stores/universally/commit/once.go:10–18  ·  view source on GitHub ↗
(key string, f func())

Source from the content-addressed store, hash-verified

8)
9
10func onceMigrate(key string, f func()) {
11 lock.Lock()
12 defer lock.Unlock()
13 if _, ok := onceMap[key]; ok {
14 return
15 }
16 f()
17 onceMap[key] = struct{}{}
18}

Callers 1

OnCompleteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected