forked from forgejo/forgejo
Upgrade go dependencies (#25819)
This commit is contained in:
parent
b81c013057
commit
c5e187c389
10 changed files with 379 additions and 398 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue