fix lines in list endpoint
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,4 @@
|
|||||||
.idea/
|
.idea/
|
||||||
|
cache/
|
||||||
|
|
||||||
|
/config.toml
|
||||||
|
|||||||
3
main.go
3
main.go
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user