Skip to content

Commit 1b9993f

Browse files
committed
fix(lint): gofmt formatting across examples and packages
1 parent 2891846 commit 1b9993f

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

examples/gin-web-server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import (
2020
"strconv"
2121
"time"
2222

23-
"github.com/gin-gonic/gin"
2423
"github.com/1mb-dev/obcache-go/v2/pkg/obcache"
24+
"github.com/gin-gonic/gin"
2525
)
2626

2727
// User represents a user profile

examples/prometheus/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import (
88
"net/http"
99
"time"
1010

11+
"github.com/1mb-dev/obcache-go/v2/pkg/obcache"
1112
"github.com/prometheus/client_golang/prometheus"
1213
"github.com/prometheus/client_golang/prometheus/promauto"
1314
"github.com/prometheus/client_golang/prometheus/promhttp"
14-
"github.com/1mb-dev/obcache-go/v2/pkg/obcache"
1515
)
1616

1717
// Prometheus metrics

examples/redis-cache/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"log"
77
"time"
88

9-
"github.com/redis/go-redis/v9"
109
"github.com/1mb-dev/obcache-go/v2/pkg/obcache"
10+
"github.com/redis/go-redis/v9"
1111
)
1212

1313
// User represents a simple user struct

internal/eviction/lru.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package eviction
33
import (
44
"sync"
55

6-
lru "github.com/hashicorp/golang-lru/v2"
76
"github.com/1mb-dev/obcache-go/v2/internal/entry"
7+
lru "github.com/hashicorp/golang-lru/v2"
88
)
99

1010
// LRUStrategy implements the LRU (Least Recently Used) eviction strategy

pkg/compression/compression_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,9 @@ func TestDecompressAndDeserialize(t *testing.T) {
359359

360360
func TestRoundTrip(t *testing.T) {
361361
type ComplexData struct {
362-
ID int `json:"id"`
363-
Name string `json:"name"`
364-
Tags []string `json:"tags"`
362+
ID int `json:"id"`
363+
Name string `json:"name"`
364+
Tags []string `json:"tags"`
365365
Metadata map[string]string `json:"metadata"`
366366
}
367367

pkg/obcache/doc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@
202202
// - Use hooks judiciously to avoid performance overhead
203203
// - Monitor hit rates and adjust cache policies accordingly
204204
// - Choose eviction strategy based on access patterns:
205-
// * LRU: Good for temporal locality (recently used data)
206-
// * LFU: Good for frequency patterns (popular items)
207-
// * FIFO: Simple, predictable, good for time-series data
205+
// - LRU: Good for temporal locality (recently used data)
206+
// - LFU: Good for frequency patterns (popular items)
207+
// - FIFO: Simple, predictable, good for time-series data
208208
//
209209
// # Thread Safety
210210
//

0 commit comments

Comments
 (0)