Skip to content

Commit

Permalink
style: make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
JustAnotherID committed Oct 18, 2024
1 parent 5f451af commit 25891e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dice/censor/trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (t *trie) Match(text string) (sensitiveWords map[string]Level) {

sensitiveWords = map[string]Level{}
chars := []rune(text)
for i := range len(chars) {
for i := range chars {

Check failure on line 60 in dice/censor/trie.go

View workflow job for this annotation

GitHub Actions / Review Dog

for loop can be changed to `i := range chars` (intrange)

Check failure on line 60 in dice/censor/trie.go

View workflow job for this annotation

GitHub Actions / Review Dog

for loop can be changed to `i := range chars` (intrange)
cur := t.root.findChild(chars[i])
if cur == nil {
continue
Expand Down

0 comments on commit 25891e2

Please sign in to comment.