MCPcopy
hub / github.com/projectdiscovery/katana / IsURL

Function IsURL

pkg/utils/utils.go:13–20  ·  view source on GitHub ↗

IsURL returns true if a provided string is URL

(url string)

Source from the content-addressed store, hash-verified

11
12// IsURL returns true if a provided string is URL
13func IsURL(url string) bool {
14 if value, err := urlutil.Parse(url); err == nil {
15 return value.Hostname() != ""
16 } else {
17 gologger.Debug().Msgf("IsURL: failed to parse url %v got %v", url, err)
18 }
19 return false
20}
21
22// ParseSRCSetTag parses srcset tag returning found URLs
23func ParseSRCSetTag(value string) []string {

Callers 3

DoMethod · 0.92
EnqueueMethod · 0.92
DoMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected