diff options
author | 2022-11-14 09:14:34 +0000 | |
---|---|---|
committer | 2022-11-14 09:14:34 +0000 | |
commit | 8f2d3ca664a060918c6bf849cbb30ddb2b854433 (patch) | |
tree | de41c7c60f702f7b5fa5170d590f01a5e209d9b4 /vendor/codeberg.org/gruf/go-cache/v3/result/key.go | |
parent | [bugfix] Fix login on Mastodon iOS app for users with no statuses (#1042) (diff) | |
download | gotosocial-8f2d3ca664a060918c6bf849cbb30ddb2b854433.tar.xz |
[chore]: Bump codeberg.org/gruf/go-cache/v3 from 3.1.7 to 3.1.8 (#1043)
Bumps codeberg.org/gruf/go-cache/v3 from 3.1.7 to 3.1.8.
---
updated-dependencies:
- dependency-name: codeberg.org/gruf/go-cache/v3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/codeberg.org/gruf/go-cache/v3/result/key.go')
-rw-r--r-- | vendor/codeberg.org/gruf/go-cache/v3/result/key.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/codeberg.org/gruf/go-cache/v3/result/key.go b/vendor/codeberg.org/gruf/go-cache/v3/result/key.go index 0dc1276a5..000633221 100644 --- a/vendor/codeberg.org/gruf/go-cache/v3/result/key.go +++ b/vendor/codeberg.org/gruf/go-cache/v3/result/key.go @@ -77,6 +77,19 @@ func (sk structKeys) generate(a any) []cachedKey { return keys } +type cacheKeys []cachedKey + +// drop will drop the cachedKey with lookup name from receiving cacheKeys slice. +func (ck *cacheKeys) drop(name string) { + _ = *ck // move out of loop + for i := range *ck { + if (*ck)[i].key.name == name { + (*ck) = append((*ck)[:i], (*ck)[i+1:]...) + break + } + } +} + // cachedKey represents an actual cached key. type cachedKey struct { // key is a reference to the structKey this |