From c69e22fdfeebaa78cee406888544692de7221d2e Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sun, 19 Apr 2026 23:36:04 +0700 Subject: [PATCH] checker: adopt unified ReportContext reporter signature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow the checker-sdk-go interface consolidation: reporter methods now take sdk.ReportContext and read the payload via ctx.Data() instead of the raw json.RawMessage parameter. Backed by the same underlying logic — this is a signature migration. Co-Authored-By: Claude Opus 4.7 (1M context) --- checker/report.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/checker/report.go b/checker/report.go index 0dfd9f6..2ec52bb 100644 --- a/checker/report.go +++ b/checker/report.go @@ -5,6 +5,8 @@ import ( "fmt" "html/template" "strings" + + sdk "git.happydns.org/checker-sdk-go/checker" ) // reportData is the view-model fed to the HTML template. @@ -167,9 +169,9 @@ th{font-weight:600;color:#6b7280;background:#f9fafb} `)) -func (p *srvProvider) GetHTMLReport(raw json.RawMessage) (string, error) { +func (p *srvProvider) GetHTMLReport(ctx sdk.ReportContext) (string, error) { var d SRVData - if err := json.Unmarshal(raw, &d); err != nil { + if err := json.Unmarshal(ctx.Data(), &d); err != nil { return "", fmt.Errorf("failed to unmarshal SRV report: %w", err) }