mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Upgrade go dependencies (#25819)
This commit is contained in:
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/alecthomas/chroma/v2/formatters/html"
|
||||
"github.com/alecthomas/chroma/v2/lexers"
|
||||
"github.com/alecthomas/chroma/v2/styles"
|
||||
lru "github.com/hashicorp/golang-lru"
|
||||
lru "github.com/hashicorp/golang-lru/v2"
|
||||
)
|
||||
|
||||
// don't index files larger than this many bytes for performance purposes
|
||||
@@ -35,7 +35,7 @@ var (
|
||||
|
||||
once sync.Once
|
||||
|
||||
cache *lru.TwoQueueCache
|
||||
cache *lru.TwoQueueCache[string, any]
|
||||
|
||||
githubStyles = styles.Get("github")
|
||||
)
|
||||
@@ -46,7 +46,7 @@ func NewContext() {
|
||||
highlightMapping = setting.GetHighlightMapping()
|
||||
|
||||
// The size 512 is simply a conservative rule of thumb
|
||||
c, err := lru.New2Q(512)
|
||||
c, err := lru.New2Q[string, any](512)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("failed to initialize LRU cache for highlighter: %s", err))
|
||||
}
|
||||
|
Reference in New Issue
Block a user