fix lines in list endpoint
This commit is contained in:
3
main.go
3
main.go
@@ -147,7 +147,7 @@ func main() {
|
||||
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||
for i, link := range links {
|
||||
if i > 0 {
|
||||
_, _ = w.Write([]byte("\n"))
|
||||
_, _ = w.Write([]byte("\n\n"))
|
||||
}
|
||||
_, _ = w.Write([]byte(link))
|
||||
}
|
||||
@@ -185,6 +185,7 @@ func pollSource(ctx context.Context, source string, interval time.Duration, cach
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
log.Printf("poller shutdown")
|
||||
return
|
||||
case <-ticker.C:
|
||||
runOnce(ctx, source, cacheDir, agg, client)
|
||||
|
||||
Reference in New Issue
Block a user