diff options
| author | demo <demo@antix1> | 2026-05-23 11:38:00 -0400 |
|---|---|---|
| committer | demo <demo@antix1> | 2026-05-23 11:38:00 -0400 |
| commit | 03f66133779ef2d35624ace7ecf1f427bece0b9b (patch) | |
| tree | 357e1eeb0c9fec22e9d33165aa2a571894b41f82 /main.go | |
| parent | 21cb8e5b5c752c458a8c829a0b7b1d4ba5ce442a (diff) | |
feat: add diagnostics to prove code is buggy
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 { |
