2 ms·
c.OnHTML("a[href]", func(e *colly.HTMLElement) { e.Request.Visit(e.Attr("href")) }) Sometimes I wish Go idioms included an iterator abstraction, it's easier
by kristianp 4y ago
c.OnHTML("a[href]", func(e *colly.HTMLElement) {
e.Request.Visit(e.Attr("href"))
})
Sometimes I wish Go idioms included an iterator abstraction, it's easier to understand and less hideous than that functional callback style.