diff --git a/analyzer.go b/analyzer.go index f3239eb..4b1897b 100644 --- a/analyzer.go +++ b/analyzer.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import ( sitter "github.com/smacker/go-tree-sitter" diff --git a/analyzer_test.go b/analyzer_test.go index ce17461..c844cdd 100644 --- a/analyzer_test.go +++ b/analyzer_test.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import "testing" diff --git a/maybeurl.go b/maybeurl.go index 8278eb1..37d2db6 100644 --- a/maybeurl.go +++ b/maybeurl.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import ( "net/url" diff --git a/maybeurl_test.go b/maybeurl_test.go index 37a579d..a570e0c 100644 --- a/maybeurl_test.go +++ b/maybeurl_test.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import ( "testing" diff --git a/objects.go b/objects.go index 49234f8..11ba408 100644 --- a/objects.go +++ b/objects.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import ( "strings" diff --git a/set.go b/set.go index 343969b..0dc065b 100644 --- a/set.go +++ b/set.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice type set map[string]any diff --git a/strings.go b/strings.go index b8dc48e..b7d280d 100644 --- a/strings.go +++ b/strings.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import ( "strconv" diff --git a/strings_test.go b/strings_test.go index 0c28fa5..d749ef3 100644 --- a/strings_test.go +++ b/strings_test.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import ( "testing" diff --git a/tree.go b/tree.go index 925c080..2514acc 100644 --- a/tree.go +++ b/tree.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import ( "fmt" diff --git a/tree_test.go b/tree_test.go index 62b2a92..31c73b9 100644 --- a/tree_test.go +++ b/tree_test.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import ( "strconv" diff --git a/url-match-jquery.go b/url-match-jquery.go index c47d63a..290f3a3 100644 --- a/url-match-jquery.go +++ b/url-match-jquery.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import ( "strings" @@ -7,9 +7,9 @@ import ( "golang.org/x/exp/slices" ) -func matchJQuery() urlMatcher { +func matchJQuery() URLMatcher { - return urlMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL { + return URLMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL { callName := content(n.ChildByFieldName("function"), source) if !slices.Contains( diff --git a/url-match-xhr.go b/url-match-xhr.go index d9f2c1a..22b52f8 100644 --- a/url-match-xhr.go +++ b/url-match-xhr.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import ( "strings" @@ -32,10 +32,10 @@ func (c *nodeCache) get(k *sitter.Node) ([]*sitter.Node, bool) { return v, exists } -func matchXHR() urlMatcher { +func matchXHR() URLMatcher { cache := newNodeCache() - return urlMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL { + return URLMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL { callName := content(n.ChildByFieldName("function"), source) // We don't know what the XMLHttpRequest object will be called, diff --git a/url-matchers.go b/url-matchers.go index fea56da..6e638b5 100644 --- a/url-matchers.go +++ b/url-matchers.go @@ -1,4 +1,4 @@ -package jsurls +package jsluice import ( "net/url"