Skip to content

Commit

Permalink
fix: use equality for empty string comparison
Browse files Browse the repository at this point in the history
Co-authored-by: Johan Lindell <[email protected]>
  • Loading branch information
jamestelfer and lindell authored Nov 1, 2023
1 parent e3a2f7e commit 97c25a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/scm/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (g *Github) getRepositories(ctx context.Context) ([]*github.Repository, err
allRepos = append(allRepos, repos...)
}

if len(g.CodeSearch) > 0 {
if g.CodeSearch) != "" {

Check failure on line 226 in internal/scm/github/github.go

View workflow job for this annotation

GitHub Actions / Build

syntax error: unexpected ), expected {

Check failure on line 226 in internal/scm/github/github.go

View workflow job for this annotation

GitHub Actions / golangci-lint

[golangci] reported by reviewdog 🐶 syntax error: unexpected ), expected {) (typecheck) Raw Output: internal/scm/github/github.go:226:17: syntax error: unexpected ), expected {) (typecheck) "github.com/lindell/multi-gitter/internal/scm/github" ^

Check failure on line 226 in internal/scm/github/github.go

View workflow job for this annotation

GitHub Actions / golangci-lint

[golangci] reported by reviewdog 🐶 syntax error: unexpected ), expected { (typecheck) Raw Output: internal/scm/github/github.go:226:17: syntax error: unexpected ), expected { (typecheck) package github

Check failure on line 226 in internal/scm/github/github.go

View workflow job for this annotation

GitHub Actions / golangci-lint

[golangci] reported by reviewdog 🐶 expected ';', found ')' (typecheck) Raw Output: internal/scm/github/github.go:226:17: expected ';', found ')' (typecheck) if g.CodeSearch) != "" { ^

Check failure on line 226 in internal/scm/github/github.go

View workflow job for this annotation

GitHub Actions / golangci-lint

[golangci] reported by reviewdog 🐶 syntax error: unexpected ), expected {) (typecheck) Raw Output: internal/scm/github/github.go:226:17: syntax error: unexpected ), expected {) (typecheck) "github.com/lindell/multi-gitter/internal/scm/github" ^

Check failure on line 226 in internal/scm/github/github.go

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

syntax error: unexpected ), expected {
repos, err := g.getCodeSearchRepositories(ctx, g.CodeSearch)
if err != nil {

Check failure on line 228 in internal/scm/github/github.go

View workflow job for this annotation

GitHub Actions / golangci-lint

[golangci] reported by reviewdog 🐶 expected '{', found 'if' (typecheck) Raw Output: internal/scm/github/github.go:228:3: expected '{', found 'if' (typecheck) if err != nil { ^
return nil, errors.Wrapf(err, "could not get code search results for '%s'", g.CodeSearch)

Check failure on line 229 in internal/scm/github/github.go

View workflow job for this annotation

GitHub Actions / golangci-lint

[golangci] reported by reviewdog 🐶 expected operand, found 'return' (typecheck) Raw Output: internal/scm/github/github.go:229:4: expected operand, found 'return' (typecheck) return nil, errors.Wrapf(err, "could not get code search results for '%s'", g.CodeSearch) ^
Expand Down

0 comments on commit 97c25a9

Please sign in to comment.