MCPcopy Create free account
hub / github.com/003random/getJS / WithResolve

Function WithResolve

extractor/extractor.go:103–113  ·  view source on GitHub ↗

WithResolve is an option to filter URLs that resolve successfully.

()

Source from the content-addressed store, hash-verified

101
102// WithResolve is an option to filter URLs that resolve successfully.
103func WithResolve() func([]url.URL) []url.URL {
104 return func(urls []url.URL) []url.URL {
105 var result []url.URL
106 for _, u := range urls {
107 if resolve(u) {
108 result = append(result, u)
109 }
110 }
111 return result
112 }
113}
114
115// complete completes relative URLs by adding the base URL.
116func complete(source url.URL, base *url.URL) url.URL {

Callers 1

filtersMethod · 0.92

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected