Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
PIP-1490: go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Baliedge committed Jan 21, 2022
1 parent 23e1dcb commit 087e181
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions benchmark_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import (
)

func BenchmarkCache(b *testing.B) {
testCases := []struct{
Name string
testCases := []struct {
Name string
NewTestCache func() gubernator.Cache
LockRequired bool
}{
{
Name: "LRUCache",
NewTestCache: func() gubernator.Cache{
NewTestCache: func() gubernator.Cache {
return gubernator.NewLRUCache(0)
},
LockRequired: true,
Expand All @@ -41,8 +41,8 @@ func BenchmarkCache(b *testing.B) {
for i := 0; i < b.N; i++ {
key := strconv.Itoa(i)
item := &gubernator.CacheItem{
Key: key,
Value: i,
Key: key,
Value: i,
ExpireAt: expire,
}
cache.Add(item)
Expand All @@ -66,8 +66,8 @@ func BenchmarkCache(b *testing.B) {

for i := 0; i < b.N; i++ {
item := &gubernator.CacheItem{
Key: strconv.Itoa(i),
Value: i,
Key: strconv.Itoa(i),
Value: i,
ExpireAt: expire,
}
cache.Add(item)
Expand All @@ -81,8 +81,8 @@ func BenchmarkCache(b *testing.B) {
for i := 0; i < b.N; i++ {
key := strconv.Itoa(i)
item := &gubernator.CacheItem{
Key: key,
Value: i,
Key: key,
Value: i,
ExpireAt: expire,
}
cache.Add(item)
Expand Down Expand Up @@ -132,8 +132,8 @@ func BenchmarkCache(b *testing.B) {
mutex.Lock()
defer mutex.Unlock()
item := &gubernator.CacheItem{
Key: strconv.Itoa(i),
Value: i,
Key: strconv.Itoa(i),
Value: i,
ExpireAt: expire,
}
cache.Add(item)
Expand All @@ -142,8 +142,8 @@ func BenchmarkCache(b *testing.B) {
} else {
task = func(i int) {
item := &gubernator.CacheItem{
Key: strconv.Itoa(i),
Value: i,
Key: strconv.Itoa(i),
Value: i,
ExpireAt: expire,
}
cache.Add(item)
Expand Down
2 changes: 1 addition & 1 deletion store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func TestLoader(t *testing.T) {
GlobalSyncWait: clock.Millisecond * 50, // Suitable for testing but not production
GlobalTimeout: clock.Second,
},
Loader: loader,
Loader: loader,
})

// loader.Load() should have been called for gubernator startup
Expand Down

0 comments on commit 087e181

Please sign in to comment.