[chore] Move DoOnce func wrapper to util (#2613)

This commit is contained in:
tobi 2024-02-09 12:38:51 +01:00 committed by GitHub
commit 7a7746701d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 36 additions and 16 deletions

View file

@ -295,7 +295,7 @@ func (d *Dereferencer) enrichStatusSafely(
// to safely defer in case of panic, while still
// performing more granular unlocks when needed.
unlock := d.state.FedLocks.Lock(uriStr)
unlock = doOnce(unlock)
unlock = util.DoOnce(unlock)
defer unlock()
// Perform status enrichment with passed vars.