summaryrefslogtreecommitdiff
path: root/scrape.go
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2023-08-16 18:25:04 +0200
committerPhilipp Tanlak <philipp.tanlak@gmail.com>2023-08-16 18:25:04 +0200
commit807796ad35b48c58f61f6c058e12ec10078fd0e3 (patch)
tree872b1eace112a066099a18c03191e2c7e162e35b /scrape.go
parent062b36fe5725d1267c66db2e506b4131d78ce772 (diff)
create cli
Diffstat (limited to 'scrape.go')
-rw-r--r--scrape.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/scrape.go b/scrape.go
index 3706510..0c31518 100644
--- a/scrape.go
+++ b/scrape.go
@@ -59,6 +59,9 @@ func (s *Scraper) Scrape() <-chan ScrapeResult {
if s.Concurrency == 0 {
s.Concurrency = 1
}
+ if s.FetchFunc == nil {
+ s.FetchFunc = Fetch()
+ }
jobs := make(chan target, 1024)
results := make(chan result)