From 0351f4f188207d0204e1e0124d32127e820e33d5 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 23 Jul 2026 13:28:38 +0200 Subject: readings: lectionary router + part filtering --- internal/liturgy/fetch.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal/liturgy') diff --git a/internal/liturgy/fetch.go b/internal/liturgy/fetch.go index d6cc4b6..5447552 100644 --- a/internal/liturgy/fetch.go +++ b/internal/liturgy/fetch.go @@ -15,6 +15,13 @@ import ( // It is a package var so tests can point it at an httptest server. var baseURL = "https://niezbednik.niedziela.pl/liturgia/%s/Ewangelia" +// SetBaseURL overrides the fetch URL template used by Load. It exists so +// tests in other packages (e.g. internal/readings) can point Load at an +// httptest server; production code must never call it. +func SetBaseURL(url string) { + baseURL = url +} + // userAgent is sent on every fetch; the site serves a different (broken) // page to non-browser clients without it. const userAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 " + -- cgit v1.3