mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-05 21:33:18 -06:00
bump go-structr to v0.8.9 (returns early if zero uncached keys to be loaded)
This commit is contained in:
parent
e5c27a9fea
commit
83d8b0680a
6 changed files with 11 additions and 5 deletions
5
vendor/codeberg.org/gruf/go-structr/cache.go
generated
vendored
5
vendor/codeberg.org/gruf/go-structr/cache.go
generated
vendored
|
|
@ -375,6 +375,11 @@ func (c *Cache[T]) Load(index *Index, keys []Key, load func([]Key) ([]T, error))
|
|||
// the lock.
|
||||
unlock()
|
||||
|
||||
if len(keys) == 0 {
|
||||
// We loaded everything!
|
||||
return values, nil
|
||||
}
|
||||
|
||||
// Load uncached values.
|
||||
uncached, err := load(keys)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue