We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7c8968 commit daef21dCopy full SHA for daef21d
pkg/cache/cache.go
@@ -0,0 +1,6 @@
1
+package cache
2
+
3
+type ICache interface {
4
+ Get(string) string
5
+ Set(string, string)
6
+}
pkg/cache/lru.go renamed to pkg/lru/lru.go
@@ -1,6 +1,10 @@
package lru
-import "sync"
+import (
+ "sync"
+ "github.com/Oudwins/tailwind-merge-go/pkg/cache"
7
+)
8
9
type node struct {
10
key string
@@ -9,11 +13,6 @@ type node struct {
13
next *node
14
}
11
15
12
-type Cache interface {
- Get(string) string
- Set(string, string)
-}
16
-
17
type LRU struct {
18
maxCapacity int
19
capacity int
@@ -81,7 +80,7 @@ func (lru *LRU) remove(n *node) {
81
80
lru.capacity--
82
83
84
-func Make(maxCapacity int) Cache {
+func Make(maxCapacity int) cache.ICache {
85
head := &node{}
86
tail := &node{}
87
tail.next = head
0 commit comments