diff options
author | Joe Chen <jc@unknwon.io> | 2023-02-02 21:25:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 21:25:25 +0800 |
commit | c53a1998c589a544b25d53f6e6fdf0f24a4df25b (patch) | |
tree | 1c3c9d693ba551eecfbc535be942e40b5acf9cf7 /internal/db/issue.go | |
parent | 614382fec0ba05149785539ab93560d4d42c194d (diff) |
all: replace `interface{}` with `any` (#7330)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/db/issue.go')
-rw-r--r-- | internal/db/issue.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/db/issue.go b/internal/db/issue.go index c7e09ab9..ea4518bc 100644 --- a/internal/db/issue.go +++ b/internal/db/issue.go @@ -793,7 +793,7 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string) var _ errutil.NotFound = (*ErrIssueNotExist)(nil) type ErrIssueNotExist struct { - args map[string]interface{} + args map[string]any } func IsErrIssueNotExist(err error) bool { @@ -813,12 +813,12 @@ func (ErrIssueNotExist) NotFound() bool { func GetIssueByRef(ref string) (*Issue, error) { n := strings.IndexByte(ref, byte('#')) if n == -1 { - return nil, ErrIssueNotExist{args: map[string]interface{}{"ref": ref}} + return nil, ErrIssueNotExist{args: map[string]any{"ref": ref}} } index := com.StrTo(ref[n+1:]).MustInt64() if index == 0 { - return nil, ErrIssueNotExist{args: map[string]interface{}{"ref": ref}} + return nil, ErrIssueNotExist{args: map[string]any{"ref": ref}} } repo, err := GetRepositoryByRef(ref[:n]) @@ -844,7 +844,7 @@ func GetRawIssueByIndex(repoID, index int64) (*Issue, error) { if err != nil { return nil, err } else if !has { - return nil, ErrIssueNotExist{args: map[string]interface{}{"repoID": repoID, "index": index}} + return nil, ErrIssueNotExist{args: map[string]any{"repoID": repoID, "index": index}} } return issue, nil } @@ -864,7 +864,7 @@ func getRawIssueByID(e Engine, id int64) (*Issue, error) { if err != nil { return nil, err } else if !has { - return nil, ErrIssueNotExist{args: map[string]interface{}{"issueID": id}} + return nil, ErrIssueNotExist{args: map[string]any{"issueID": id}} } return issue, nil } |