Documentation
¶
Overview ¶
Package urlutil provides helpers for working with URLs and hostnames.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalid = errors.New("urlutil: invalid")
ErrInvalid wraps every reason Registrable rejects an input — bad URL syntax, missing host, or a host the public suffix list can't reduce to a registrable domain (raw IPs, single-label hostnames like "localhost").
Functions ¶
func Registrable ¶
Registrable reduces rawURL to its registrable domain (eTLD+1).
Schemeless inputs such as "abc.google.com/test/v1" are accepted; an "https://" scheme is assumed when none is present.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.