From 386bde088203fd2dd647721b563106c55abfe3f4 Mon Sep 17 00:00:00 2001 From: maxtaran2010 Date: Fri, 10 Jul 2026 01:01:31 +0300 Subject: [PATCH] fix: correct typos in comments and test names - example_test.go: "becauce" -> "because" - policy/lfu/lfu_test.go: "initilal" -> "initial" - policy/clock/clock_test.go: "initilal" -> "initial" Found with codespell. Signed-off-by: maxtaran2010 --- example_test.go | 2 +- policy/clock/clock_test.go | 2 +- policy/lfu/lfu_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example_test.go b/example_test.go index 7aa88ba..13a2106 100644 --- a/example_test.go +++ b/example_test.go @@ -91,7 +91,7 @@ func ExampleWithReferenceCount() { c.Set("b", 2) c.Set("c", 3) - // evicted becauce the lowest reference count. + // evicted because the lowest reference count. gotb, bok := c.Get("b") fmt.Println(gotb, bok) diff --git a/policy/clock/clock_test.go b/policy/clock/clock_test.go index 2220798..6f9e768 100644 --- a/policy/clock/clock_test.go +++ b/policy/clock/clock_test.go @@ -50,7 +50,7 @@ func TestSet(t *testing.T) { t.Fatalf("invalid replacing value bar %d, cachehit %v", bar, ok) } - t.Run("with initilal reference count", func(t *testing.T) { + t.Run("with initial reference count", func(t *testing.T) { cache := clock.NewCache[string, *tmp](clock.WithCapacity(2)) cache.Set("foo", &tmp{i: 10}) // the highest reference count cache.Set("foo2", &tmp{i: 2}) // expected eviction diff --git a/policy/lfu/lfu_test.go b/policy/lfu/lfu_test.go index 35b7bff..68c64d4 100644 --- a/policy/lfu/lfu_test.go +++ b/policy/lfu/lfu_test.go @@ -48,7 +48,7 @@ func TestSet(t *testing.T) { t.Fatalf("invalid replacing value bar %d, cachehit %v", bar, ok) } - t.Run("with initilal reference count", func(t *testing.T) { + t.Run("with initial reference count", func(t *testing.T) { cache := lfu.NewCache[string, *tmp](lfu.WithCapacity(2)) cache.Set("foo", &tmp{i: 10}) // the highest reference count cache.Set("foo2", &tmp{i: 2}) // expected eviction