diff options
author | ale <ale@incal.net> | 2017-12-19 00:12:11 +0000 |
---|---|---|
committer | ale <ale@incal.net> | 2017-12-19 00:12:11 +0000 |
commit | 4cd67e7234943baf31b2e122f8ee3c70c21fb489 (patch) | |
tree | c3bf3e88729291ecf0e371d0dd43977cdd1d08ea /scope_test.go | |
parent | 77211d4f6952a4d9cc92378f6a1cbacd3b5426ca (diff) | |
download | crawl-4cd67e7234943baf31b2e122f8ee3c70c21fb489.tar.gz crawl-4cd67e7234943baf31b2e122f8ee3c70c21fb489.zip |
Add tags (primary/related) to links
This change allows more complex scope boundaries, including loosening
edges a bit to include related resources of HTML pages (which makes
for more complete archives if desired).
Diffstat (limited to 'scope_test.go')
-rw-r--r-- | scope_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scope_test.go b/scope_test.go index bccf93c..95366bb 100644 --- a/scope_test.go +++ b/scope_test.go @@ -19,7 +19,7 @@ type testScopeEntry struct { func runScopeTest(t *testing.T, sc Scope, testdata []testScopeEntry) { for _, td := range testdata { uri := mustParseURL(td.uri) - result := sc.Check(uri, td.depth) + result := sc.Check(Outlink{URL: uri, Tag: TagPrimary}, td.depth) if result != td.expected { t.Errorf("Check(%s, %d) -> got %v, want %v", td.uri, td.depth, result, td.expected) } |