Browse Source

move variable definitions closer to usage

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/197/head
Michael Telatynski 7 years ago
parent
commit
1cc6d0315f
No known key found for this signature in database GPG Key ID: 3F879DA5AD802A5E
  1. 5
      src/github.com/matrix-org/go-neb/services/github/github.go

5
src/github.com/matrix-org/go-neb/services/github/github.go

@ -103,9 +103,6 @@ func (s *Service) cmdGithubSearch(roomID, userID string, args []string) (interfa
}
numResults := *searchResult.Total
var htmlBuffer bytes.Buffer
var plainBuffer bytes.Buffer
numberOfSummaries := numberGithubSearchSummaries
if numResults < numberGithubSearchSummaries {
numberOfSummaries = numResults
@ -113,6 +110,8 @@ func (s *Service) cmdGithubSearch(roomID, userID string, args []string) (interfa
summarizedIssues := searchResult.Issues[0:numberOfSummaries]
var htmlBuffer bytes.Buffer
var plainBuffer bytes.Buffer
htmlBuffer.WriteString(fmt.Sprintf("Found %d results, here are the most relevant:<br><ol>", numResults))
plainBuffer.WriteString(fmt.Sprintf("Found %d results, here are the most relevant:\n", numResults))
for i, issue := range summarizedIssues {

Loading…
Cancel
Save