diff options
author | 2024-02-09 12:38:51 +0100 | |
---|---|---|
committer | 2024-02-09 11:38:51 +0000 | |
commit | 7a7746701df54decb4763ff2813bb9897a178ccf (patch) | |
tree | 2676d8c060618fffedde252887ea709de261d88c /internal/federation/dereferencing/util.go | |
parent | [feature/performance] sqlite pragma optimize on close (#2596) (diff) | |
download | gotosocial-7a7746701df54decb4763ff2813bb9897a178ccf.tar.xz |
[chore] Move `DoOnce` func wrapper to util (#2613)
Diffstat (limited to 'internal/federation/dereferencing/util.go')
-rw-r--r-- | internal/federation/dereferencing/util.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/internal/federation/dereferencing/util.go b/internal/federation/dereferencing/util.go index c37f2d82d..38622f6c1 100644 --- a/internal/federation/dereferencing/util.go +++ b/internal/federation/dereferencing/util.go @@ -23,17 +23,6 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" ) -// doOnce wraps a function to only perform it once. -func doOnce(fn func()) func() { - var once int32 - return func() { - if once == 0 { - fn() - once = 1 - } - } -} - // pollChanged returns whether a poll has changed in way that // indicates that this should be an entirely new poll. i.e. if // the available options have changed, or the expiry has increased. |