Skip to content

Commit 1f5e891

Browse files
authored
Merge pull request #28 from planetlabs/silent
Avoid logging http requests
2 parents c15009f + 39df5a2 commit 1f5e891

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crawler/crawler.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ import (
1717
"github.com/tschaub/workgroup"
1818
)
1919

20+
var httpClient = retryablehttp.NewClient()
21+
22+
func init() {
23+
httpClient.Logger = nil
24+
}
25+
2026
// RecursionType informs the crawler how to treat linked resources.
2127
// None will only call the visitor for the first resource. Children
2228
// will call the visitor for all child catalogs, collections, and items.
@@ -65,7 +71,7 @@ func loadFile(resourcePath string, value any) error {
6571
}
6672

6773
func loadUrl(resourceUrl string, value any) error {
68-
resp, err := retryablehttp.Get(resourceUrl)
74+
resp, err := httpClient.Get(resourceUrl)
6975
if err != nil {
7076
return err
7177
}

0 commit comments

Comments
 (0)