diff options
author | Michael Muré <batolettre@gmail.com> | 2022-11-29 13:01:53 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-11-29 13:01:53 +0100 |
commit | 4a341b5e1714a6a36ec7f5839a6a1b73571d4851 (patch) | |
tree | 261e108d1c9bd78e15e19379f611cfecb900fef5 /cache/cached.go | |
parent | 0ac39a7ab5db077fcf0df827e32bf6e625e980da (diff) | |
download | git-bug-4a341b5e1714a6a36ec7f5839a6a1b73571d4851.tar.gz |
WIP
Diffstat (limited to 'cache/cached.go')
-rw-r--r-- | cache/cached.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cache/cached.go b/cache/cached.go index 5e24e732..75ca58e5 100644 --- a/cache/cached.go +++ b/cache/cached.go @@ -104,6 +104,12 @@ func (e *CachedEntityBase[SnapT, OpT]) ResolveOperationWithMetadata(key string, return matching[0], nil } +func (e *CachedEntityBase[SnapT, OpT]) Validate() error { + e.mu.RLock() + defer e.mu.RUnlock() + return e.entity.Validate() +} + func (e *CachedEntityBase[SnapT, OpT]) Commit() error { e.mu.Lock() err := e.entity.Commit(e.repo) |