From bcbcef747bc8cff99a53b1722fce9701e893db70 Mon Sep 17 00:00:00 2001 From: rhysd Date: Sun, 17 Dec 2017 22:38:21 +0900 Subject: [PATCH] fix condition to use -count value --- ghca/collect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghca/collect.go b/ghca/collect.go index b962652..09a2574 100644 --- a/ghca/collect.go +++ b/ghca/collect.go @@ -139,7 +139,7 @@ func NewCollector(query, token, dest string, extract *regexp.Regexp, count int, } if c.maxPage == PageUnlimited { maxRepos := 1000.0 - if count != 0 { + if 0 < count && count < 1000 { maxRepos = float64(count) } c.maxPage = uint(math.Ceil(maxRepos / float64(c.perPage)))