aboutsummaryrefslogtreecommitdiff
path: root/internal/db/action.go
diff options
context:
space:
mode:
authordeepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>2022-03-06 16:33:45 +0800
committerGitHub <noreply@github.com>2022-03-06 16:33:45 +0800
commitdeec3516d53e9a9679128ade0556ccc818a67be1 (patch)
treeb5c1c5d55be05a244180ece0b822e7e35dc68f42 /internal/db/action.go
parent65526f84e1d382ac01b7379f40fc56b2660d1074 (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.go6
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
}