mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-06 02:15:20 +02:00
Code Formats, Nits & Unused Func/Var deletions (#15286)
* _ to unused func options * rm useless brakets * rm trifial non used models functions * rm dead code * rm dead global vars * fix routers/api/v1/repo/issue.go * dont overload import module
This commit is contained in:
parent
0991f9aa42
commit
9c4601bdf8
33 changed files with 41 additions and 98 deletions
|
@ -510,19 +510,6 @@ func GetLabelIDsInOrgByNames(orgID int64, labelNames []string) ([]int64, error)
|
|||
Find(&labelIDs)
|
||||
}
|
||||
|
||||
// GetLabelIDsInOrgsByNames returns a list of labelIDs by names in one of the given
|
||||
// organization.
|
||||
// it silently ignores label names that do not belong to the organization.
|
||||
func GetLabelIDsInOrgsByNames(orgIDs []int64, labelNames []string) ([]int64, error) {
|
||||
labelIDs := make([]int64, 0, len(labelNames))
|
||||
return labelIDs, x.Table("label").
|
||||
In("org_id", orgIDs).
|
||||
In("name", labelNames).
|
||||
Asc("name").
|
||||
Cols("id").
|
||||
Find(&labelIDs)
|
||||
}
|
||||
|
||||
// GetLabelInOrgByID returns a label by ID in given organization.
|
||||
func GetLabelInOrgByID(orgID, labelID int64) (*Label, error) {
|
||||
return getLabelInOrgByID(x, orgID, labelID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue