summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/main.go b/main.go
index a3ee0cf..33989df 100644
--- a/main.go
+++ b/main.go
@@ -51,6 +51,8 @@ func main() {
seen := make(map[url.URL]bool)
i := 1
+ // FIXME: unfortunately, this example leaks, but I don't know
+ // how to fix that yet.
loop:
for list := range worklist {
for _, u := range list {
@@ -73,6 +75,16 @@ loop:
}
}
}
+
+ // For now, print out some diagnostics that prove that there
+ // are still pending sends on the worklist channel.
+ for batch := range worklist {
+ fmt.Printf("%d\n", len(batch))
+
+ for _, u := range batch {
+ fmt.Printf("-- %s\n", &u)
+ }
+ }
}
func crawl(ctx context.Context, u url.URL) []url.URL {