diff options
author | harryzcy <harry@harryzheng.com> | 2023-07-13 22:00:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-14 11:00:31 +0800 |
commit | c5e187c389b35b9e080a3187b93a775a3c81e585 (patch) | |
tree | 7c65ee5aaf56b6f53a96742286d98119dba5b13b /models/actions | |
parent | b81c01305714ceca818ccb91d19dada6469e658c (diff) | |
download | gitea-c5e187c389b35b9e080a3187b93a775a3c81e585.tar.gz gitea-c5e187c389b35b9e080a3187b93a775a3c81e585.zip |
Upgrade go dependencies (#25819)
Diffstat (limited to 'models/actions')
-rw-r--r-- | models/actions/task.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/actions/task.go b/models/actions/task.go index 719fd19365..55044ec82d 100644 --- a/models/actions/task.go +++ b/models/actions/task.go @@ -18,7 +18,7 @@ import ( "code.gitea.io/gitea/modules/util" runnerv1 "code.gitea.io/actions-proto-go/runner/v1" - lru "github.com/hashicorp/golang-lru" + lru "github.com/hashicorp/golang-lru/v2" "github.com/nektos/act/pkg/jobparser" "google.golang.org/protobuf/types/known/timestamppb" "xorm.io/builder" @@ -57,13 +57,13 @@ type ActionTask struct { Updated timeutil.TimeStamp `xorm:"updated index"` } -var successfulTokenTaskCache *lru.Cache +var successfulTokenTaskCache *lru.Cache[string, any] func init() { db.RegisterModel(new(ActionTask), func() error { if setting.SuccessfulTokensCacheSize > 0 { var err error - successfulTokenTaskCache, err = lru.New(setting.SuccessfulTokensCacheSize) + successfulTokenTaskCache, err = lru.New[string, any](setting.SuccessfulTokensCacheSize) if err != nil { return fmt.Errorf("unable to allocate Task cache: %v", err) } |