Remove deadcode under models/issues (#28536)
Using the Go Official tool `golang.org/x/tools/cmd/deadcode@latest` mentioned by [go blog](https://go.dev/blog/deadcode). Just use `deadcode .` in the project root folder and it gives a list of unused functions. Though it has some false alarms. This PR removes dead code detected in `models/issues`.
This commit is contained in:
parent
e7cb8da2a8
commit
6a725b6f9c
11 changed files with 9 additions and 200 deletions
|
@ -534,15 +534,6 @@ func GetIssueByID(ctx context.Context, id int64) (*Issue, error) {
|
|||
return issue, nil
|
||||
}
|
||||
|
||||
// GetIssueWithAttrsByID returns an issue with attributes by given ID.
|
||||
func GetIssueWithAttrsByID(ctx context.Context, id int64) (*Issue, error) {
|
||||
issue, err := GetIssueByID(ctx, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return issue, issue.LoadAttributes(ctx)
|
||||
}
|
||||
|
||||
// GetIssuesByIDs return issues with the given IDs.
|
||||
// If keepOrder is true, the order of the returned issues will be the same as the given IDs.
|
||||
func GetIssuesByIDs(ctx context.Context, issueIDs []int64, keepOrder ...bool) (IssueList, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue