News for hackers. Stuff that matters.
Re:Colly: Fast and Elegant Scraping Framework for Golang by asciimoo on Thursday October 05, 2017 @10:34AM (#15409488)
How do you recognize if the collector has finished? If the site doesn't contain "a" elements (e.g. because of a network error), this example would block forever.
Re:Colly: Fast and Elegant Scraping Framework for Golang by dward on Thursday October 05, 2017 @10:59AM (#15409677)
The producer closes the channel. This is differentiable from an open empty channel in a select.
Re:Colly: Fast and Elegant Scraping Framework for Golang by asciimoo on Thursday October 05, 2017 @11:17AM (#15409847)
Makes sense, thanks =)

In the above example this would require `nil` checking of the retrieved value every time. I'm not sure if it would make the API cleaner