diff options
author | CaiCandong <50507092+CaiCandong@users.noreply.github.com> | 2023-09-07 17:37:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 09:37:47 +0000 |
commit | a78c2eae243077c1fed5f7b056c64072d3c63ac8 (patch) | |
tree | 53b63a8dafde117e76f5fede968e384ae55779b1 /models/actions/run.go | |
parent | e97e883ad50774f249c8c694598c25a17227299b (diff) | |
download | gitea-a78c2eae243077c1fed5f7b056c64072d3c63ac8.tar.gz gitea-a78c2eae243077c1fed5f7b056c64072d3c63ac8.zip |
Replace `util.SliceXxx` with `slices.Xxx` (#26958)
Diffstat (limited to 'models/actions/run.go')
-rw-r--r-- | models/actions/run.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/actions/run.go b/models/actions/run.go index 18ed447e80..4853afc15b 100644 --- a/models/actions/run.go +++ b/models/actions/run.go @@ -6,6 +6,7 @@ package actions import ( "context" "fmt" + "slices" "strings" "time" @@ -350,7 +351,7 @@ func UpdateRun(ctx context.Context, run *ActionRun, cols ...string) error { // It's impossible that the run is not found, since Gitea never deletes runs. } - if run.Status != 0 || util.SliceContains(cols, "status") { + if run.Status != 0 || slices.Contains(cols, "status") { if run.RepoID == 0 { run, err = GetRunByID(ctx, run.ID) if err != nil { |