feat(gitea): default-branch lru cache

Shared LRU avoids repeated Gitea calls for default-branch resolution;
the simple stdlib map alternative would race on concurrent access without
a mutex per entry, which is more code than the LRU.
This commit is contained in:
Mathias Bergqvist
2026-05-04 23:06:06 +02:00
parent fb473262ba
commit 4274b48ea5
7 changed files with 54 additions and 12 deletions

1
go.mod
View File

@@ -4,6 +4,7 @@ go 1.26.2
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.11.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect