Skip to content

Commit

Permalink
Fix linter notices
Browse files Browse the repository at this point in the history
  • Loading branch information
adrg committed Mar 19, 2024
1 parent 13281b9 commit a9937b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/ngram/ngram.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func Map(runes []rune, size int) (map[string]int, int) {
var ngramCount int
for i := 0; i < limit; i++ {
ngram := string(runes[i : i+size])
count, _ := ngrams[ngram]
count := ngrams[ngram]
ngrams[ngram] = count + 1
ngramCount++
}
Expand Down Expand Up @@ -94,7 +94,7 @@ func Intersection(a, b []rune, size int) (map[string]int, int, int, int) {

// Update common n-grams map with the matched n-gram and its
// frequency.
count, _ = commonNgrams[ngram]
count = commonNgrams[ngram]
commonNgrams[ngram] = count + 1
}
}
Expand Down

0 comments on commit a9937b0

Please sign in to comment.