Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fingerprint ¶
func Fingerprint(u *URL) (fp []fingerprint)
Fingerprint is a sha256 fingerprint generator utility for url.URL
fp[0] is u.Host fp[1] is eTLD+1 and only present when u.Host != eTLD+1
sha256: 1cbec737f863e4922cee63cc2ebbfaafcd1cff8b790d8cfd2e6a5d550b648afa
func IsPrivate ¶ added in v1.2.2
func IsPrivate(ip interface{}) (ok bool)
IsPrivate utility vefifies that an ip representation is not in a reserved range; supports url.URL, net.IP, and string types
func RemoveScheme ¶ added in v1.2.3
RemoveScheme helper removes all text before ://
Types ¶
type URL ¶
URL parse and validate url with type detections for IP|IDNA
func (*URL) EffectiveTLDPlusOne ¶
EffectiveTLDPlusOne is a wrapper around public suffix version that will convert the u.Host to the EffectiveTLDPlusOne version safely
func (*URL) Parse ¶
Parse the url into consitituate parts. Set u.IP flag if hostname is IPv4|6 and u.IDNA flag when domain converted
Source Files ¶
Click to show internal directories.
Click to hide internal directories.