diff options
author | deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> | 2022-03-06 16:33:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-06 16:33:45 +0800 |
commit | deec3516d53e9a9679128ade0556ccc818a67be1 (patch) | |
tree | b5c1c5d55be05a244180ece0b822e7e35dc68f42 /internal/db/action.go | |
parent | 65526f84e1d382ac01b7379f40fc56b2660d1074 (diff) |
autofix: fix check for empty string (#6804)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/db/action.go')
-rw-r--r-- | internal/db/action.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/db/action.go b/internal/db/action.go index a9efeeb8..970ff203 100644 --- a/internal/db/action.go +++ b/internal/db/action.go @@ -325,7 +325,7 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err ref = strings.TrimSpace(ref) ref = strings.TrimRightFunc(ref, issueIndexTrimRight) - if len(ref) == 0 { + if ref == "" { continue } @@ -368,7 +368,7 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err ref = ref[strings.IndexByte(ref, byte(' '))+1:] ref = strings.TrimRightFunc(ref, issueIndexTrimRight) - if len(ref) == 0 { + if ref == "" { continue } @@ -407,7 +407,7 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err ref = ref[strings.IndexByte(ref, byte(' '))+1:] ref = strings.TrimRightFunc(ref, issueIndexTrimRight) - if len(ref) == 0 { + if ref == "" { continue } |