1
1
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:
harryzcy
2023-07-13 22:00:31 -05:00
committed by GitHub
parent b81c013057
commit c5e187c389
10 changed files with 379 additions and 398 deletions

View File

@@ -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))
}