Skip to content

Commit

Permalink
Remove unnecessary len().
Browse files Browse the repository at this point in the history
This syntax was only added in go1.22 so needs to wait until our support for
1.21 lapses.
  • Loading branch information
msuozzo authored and wbxyz committed May 22, 2024
1 parent 00835e5 commit dfdb01f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func NewHierarchicalCache(base Cache) *HierarchicalCache {
}

func (h *HierarchicalCache) get(key any) (any, error) {
for i := range len(h.stack) {
for i := range h.stack {
c := h.stack[len(h.stack)-1-i]
if val, err := c.Get(key); err == nil {
return val, nil
Expand Down

0 comments on commit dfdb01f

Please sign in to comment.