fix lines in list endpoint

This commit is contained in:
2026-01-09 11:48:49 +03:00
parent 803ba54a1c
commit c890dad54f
2 changed files with 5 additions and 1 deletions

3
.gitignore vendored
View File

@@ -1 +1,4 @@
.idea/ .idea/
cache/
/config.toml

View File

@@ -147,7 +147,7 @@ func main() {
w.Header().Set("Content-Type", "text/plain; charset=utf-8") w.Header().Set("Content-Type", "text/plain; charset=utf-8")
for i, link := range links { for i, link := range links {
if i > 0 { if i > 0 {
_, _ = w.Write([]byte("\n")) _, _ = w.Write([]byte("\n\n"))
} }
_, _ = w.Write([]byte(link)) _, _ = w.Write([]byte(link))
} }
@@ -185,6 +185,7 @@ func pollSource(ctx context.Context, source string, interval time.Duration, cach
for { for {
select { select {
case <-ctx.Done(): case <-ctx.Done():
log.Printf("poller shutdown")
return return
case <-ticker.C: case <-ticker.C:
runOnce(ctx, source, cacheDir, agg, client) runOnce(ctx, source, cacheDir, agg, client)