mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Many places have the following logic: ```go func (jobs ActionJobList) GetRunIDs() []int64 { ids := make(container.Set[int64], len(jobs)) for _, j := range jobs { if j.RunID == 0 { continue } ids.Add(j.RunID) } return ids.Values() } ``` this introduces a `container.FilterMapUnique` function, which reduces the code above to: ```go func (jobs ActionJobList) GetRunIDs() []int64 { return container.FilterMapUnique(jobs, func(j *ActionRunJob) (int64, bool) { return j.RunID, j.RunID != 0 }) } ``` |
12 months ago | |
---|---|---|
.. | ||
branch.go | 1 year ago | |
branch_list.go | 12 months ago | |
branch_test.go | 1 year ago | |
commit_status.go | 1 year ago | |
commit_status_test.go | 1 year ago | |
lfs.go | 1 year ago | |
lfs_lock.go | 2 years ago | |
main_test.go | 2 years ago | |
protected_banch_list_test.go | 2 years ago | |
protected_branch.go | 1 year ago | |
protected_branch_list.go | 1 year ago | |
protected_branch_test.go | 2 years ago | |
protected_tag.go | 1 year ago | |
protected_tag_test.go | 2 years ago |