Skip to content

Commit

Permalink
fix golangci-lint reported errors (unused args)
Browse files Browse the repository at this point in the history
  • Loading branch information
paskal authored and umputun committed Feb 13, 2024
1 parent d16033e commit 7babaa0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ func ExampleLoadingCache_Get() {
// ExampleLoadingCache_Delete illustrates cache value eviction and OnEvicted function usage.
func ExampleLoadingCache_Delete() {
// make expirable cache (30m TTL) with up to 10 keys. Set callback on eviction event
c, err := NewExpirableCache(MaxKeys(10), TTL(time.Minute*30), OnEvicted(func(key string, value interface{}) {
c, err := NewExpirableCache(MaxKeys(10), TTL(time.Minute*30), OnEvicted(func(key string, _ interface{}) {
fmt.Println("key " + key + " evicted")
}))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func TestLoadingCacheInvalidateAndEvict(t *testing.T) {
}

func TestLoadingCacheBadOption(t *testing.T) {
lc, err := NewLoadingCache(func(lc *LoadingCache) error {
lc, err := NewLoadingCache(func(_ *LoadingCache) error {
return fmt.Errorf("mock err")
})
assert.EqualError(t, err, "failed to set cache option: mock err")
Expand Down

0 comments on commit 7babaa0

Please sign in to comment.