all database operations now take a context.Context, which is propagated through from sources
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
package htmlcheck
|
||||
|
||||
import (
|
||||
"context"
|
||||
_ "embed"
|
||||
"os"
|
||||
|
||||
@@ -76,12 +77,13 @@ func (rw *spellingRewriter) Name() string {
|
||||
|
||||
/* Rewrite rewrites the given string data and adds markup before and after if needed.
|
||||
* Parameters:
|
||||
* ctx - Standard Go error status.
|
||||
* data - The data to be rewritten.
|
||||
* svc - Services interface we can use.
|
||||
* Returns:
|
||||
* Pointer to markup data, or nil.
|
||||
*/
|
||||
func (rw *spellingRewriter) Rewrite(data string, svc rewriterServices) *markupData {
|
||||
func (rw *spellingRewriter) Rewrite(ctx context.Context, data string, svc rewriterServices) *markupData {
|
||||
if rw.dict.CheckWord(data) {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user