From 65b119ace66cf44e8bba704c86311aba519deb67 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sun, 15 Feb 2015 10:02:20 -0800 Subject: [PATCH] rename getURL() to resolveURL() because "get" may imply actually GETting it --- src/docrawler/url.go | 4 ++-- src/docrawler/url_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/docrawler/url.go b/src/docrawler/url.go index 99e4143..0e90021 100644 --- a/src/docrawler/url.go +++ b/src/docrawler/url.go @@ -26,9 +26,9 @@ func checkURL(u *url.URL) error { return nil // success! } -// getURL takes a URL and its referring URL and tries to parse it into an acceptable complete URL +// resolveURL takes a URL and its referring URL and tries to parse it into an acceptable complete URL // returns the final URL and any error -func getURL(referringURL string, currentURL string) (*url.URL, error) { +func resolveURL(referringURL string, currentURL string) (*url.URL, error) { // begin by parsing both URLs uCurrent, err := url.Parse(currentURL) if err != nil { diff --git a/src/docrawler/url_test.go b/src/docrawler/url_test.go index df6b45d..5381b64 100644 --- a/src/docrawler/url_test.go +++ b/src/docrawler/url_test.go @@ -36,9 +36,9 @@ func TestBadURL(t *testing.T) { // some tests for the base url resolution (absolute vs. relative links) func doResolveTest(t *testing.T, wanted, referrer, current string) { - u, err := getURL(referrer, current) + u, err := resolveURL(referrer, current) if err != nil { - t.Error("getURL failed (probably parsing)") + t.Error("resolveURL failed (probably parsing)") } if u.String() != wanted { fmt.Printf(" Got: %q\n", u)