cleanups to startup code and goroutine code

This commit is contained in:
2026-05-06 22:19:08 -06:00
parent 08a10a55dd
commit a2c2a1f750
9 changed files with 92 additions and 88 deletions
+4 -6
View File
@@ -55,10 +55,8 @@ func SetupDicts() {
log.Errorf("failed to load external dictionary %s: %v", config.GlobalConfig.Posting.ExternalDictionary, err)
}
}
rw := spellingRewriter{
dict: NewCompositeDict(dicts),
}
rewriterRegistry[rw.Name()] = &rw
rw := new(spellingRewriter{dict: NewCompositeDict(dicts)})
rewriterRegistry[rw.Name()] = rw
}
// spellingRewriter is a rewriter that flags spelling errors.
@@ -89,10 +87,10 @@ func (rw *spellingRewriter) Rewrite(ctx context.Context, data string, svc rewrit
if rw.dict.CheckWord(data) {
return nil
}
return &markupData{
return new(markupData{
beginMarkup: defaultBeginError,
text: data,
endMarkup: defaultEndError,
rescan: false,
}
})
}