diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-23 13:28:38 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-23 13:28:38 +0200 |
| commit | 0351f4f188207d0204e1e0124d32127e820e33d5 (patch) | |
| tree | 526ae229dd7a56987cf6f262afbf2d5f0ad53293 /internal/liturgy/fetch.go | |
| parent | f8772261f0c4feca68eee0300b5d726fd168a534 (diff) | |
| download | lectio-0351f4f188207d0204e1e0124d32127e820e33d5.tar.gz lectio-0351f4f188207d0204e1e0124d32127e820e33d5.zip | |
readings: lectionary router + part filtering
Diffstat (limited to 'internal/liturgy/fetch.go')
| -rw-r--r-- | internal/liturgy/fetch.go | 7 |
1 files changed, 7 insertions, 0 deletions
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 " + |
