summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordemo <demo@antix1>2026-06-11 22:12:03 -0400
committerdemo <demo@antix1>2026-06-11 22:12:03 -0400
commit2c077d39ce47ea88c35b76b443aceb9e0bf67a7b (patch)
tree7eaf52a735463ab9374afb3fe4b80c9a0bab930a
parentc210d76d3d8984ebc0643f5936134de22f0436d2 (diff)
style: rename findURLs to extractURLs
"Find" strongly implies an HTTP GET request, so I decided to change the name.
-rw-r--r--classic.go2
-rw-r--r--findurls.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/classic.go b/classic.go
index 46c2bad..4a0bcc5 100644
--- a/classic.go
+++ b/classic.go
@@ -107,7 +107,7 @@ func getBatch(u url.URL) []url.URL {
return nil
}
- batch := findURLs(u, htmlDoc)
+ batch := extractURLs(u, htmlDoc)
return batch
}
diff --git a/findurls.go b/findurls.go
index 8f84936..000e482 100644
--- a/findurls.go
+++ b/findurls.go
@@ -8,12 +8,12 @@ import (
"golang.org/x/net/html/atom"
)
-// findURLs combs htmlDoc for anchor-tag URLs. The refURL parameter is
+// extractURLs combs htmlDoc for anchor-tag URLs. The refURL parameter is
// used to resolve each found URL into an absolute URL, and also
// ensures that we don't crawl outside refURL's parent Web domain.
//
// Return the slice of URLs.
-func findURLs(refURL url.URL, htmlDoc *html.Node) []url.URL {
+func extractURLs(refURL url.URL, htmlDoc *html.Node) []url.URL {
// Used for collecting all the URLs we find.
var rawURLs []url.URL