aboutsummaryrefslogtreecommitdiff
path: root/cmd/links
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2022-03-24 12:02:08 -0700
committerJordan <me@jordan.im>2022-03-24 12:02:08 -0700
commit20d95915298391ea05054238c5b13337499b7af4 (patch)
tree024c080f319fc7a430343eda96ff620ed7d1febb /cmd/links
parent6355aa4310ff0c32b056580e812ca6f0e2a5ee2f (diff)
downloadcrawl-20d95915298391ea05054238c5b13337499b7af4.tar.gz
crawl-20d95915298391ea05054238c5b13337499b7af4.zip
misc: update handler signatures, tests, housekeeping
Diffstat (limited to 'cmd/links')
-rw-r--r--cmd/links/links.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/links/links.go b/cmd/links/links.go
index 95f48d9..847f80f 100644
--- a/cmd/links/links.go
+++ b/cmd/links/links.go
@@ -8,6 +8,7 @@ import (
"flag"
"log"
"net/http"
+ "os"
"strings"
"git.jordan.im/crawl"
@@ -20,8 +21,8 @@ var (
validSchemes = flag.String("schemes", "http,https", "comma-separated list of allowed protocols")
)
-func extractLinks(p crawl.Publisher, u string, tag, depth int, resp *http.Response, _ error) error {
- links, err := analysis.GetLinks(resp)
+func extractLinks(p crawl.Publisher, u string, tag, depth int, resp *http.Response, body *os.File, _ error) error {
+ links, err := analysis.GetLinks(resp, body)
if err != nil {
// Not a fatal error, just a bad web page.
return nil