From 6150eb5ad01b01133f553166b38f32cbe9592ab2 Mon Sep 17 00:00:00 2001 From: GoLangsam Date: Sun, 24 Jun 2018 03:46:45 +0200 Subject: [PATCH] @jorinvo: just a typo; and a glitch? --- httpsyet/crawler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/httpsyet/crawler.go b/httpsyet/crawler.go index e94943a..341e596 100644 --- a/httpsyet/crawler.go +++ b/httpsyet/crawler.go @@ -37,7 +37,7 @@ type site struct { Depth int } -// Run the cralwer. +// Run the crawler. // Can return validation errors. // All crawling errors are reported via logger. // Output is written to writer. @@ -139,7 +139,7 @@ func toURLs(links []string, parse func(string) (*url.URL, error)) (urls []*url.U } func parallel(p int) int { - if p == 0 { + if p < 1 { return defaultParallel } return p