all database operations now take a context.Context, which is propagated through from sources

This commit is contained in:
2025-12-20 22:29:26 -07:00
parent 9e6bf2feda
commit 5c8bb8dd5e
39 changed files with 605 additions and 504 deletions
+3 -1
View File
@@ -10,6 +10,7 @@
package htmlcheck
import (
"context"
"net/url"
"regexp"
"strings"
@@ -72,12 +73,13 @@ func (rw *urlRewriter) Name() string {
/* Rewrite rewrites the given string data and adds markup before and after if needed.
* Parameters:
* ctx - Standard Go context value.
* data - The data to be rewritten.
* svc - Services interface we can use.
* Returns:
* Pointer to markup data, or nil.
*/
func (rw *urlRewriter) Rewrite(data string, svc rewriterServices) *markupData {
func (rw *urlRewriter) Rewrite(ctx context.Context, data string, svc rewriterServices) *markupData {
for _, ue := range urlElements {
s := ue.eval(data)
if s != "" {