Documentation ¶
Index ¶
- func Normalize(u *url.URL) (string, error)
- func NormalizeString(rawURL string) (string, error)
- func Parse(rawURL string) (*url.URL, error)
- func ParseUnsafe(rawURL string) (u *url.URL)
- func RealLink(link string) (real string)
- func RealLinkClear(link string) (real string, err error)
- func RealLinkFasthttp(link string) (real string)
- func RemoveURLParams(u *url.URL)
- func Resolve(u *url.URL) (*net.IPAddr, error)
- func ResolveString(rawURL string) (*net.IPAddr, error)
- func SplitHostPort(u *url.URL) (host, port string, err error)
- func URIEncode(uri string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Normalize ¶
Normalize returns normalized URL string. Behavior: 1. Remove unnecessary host dots. 2. Remove default port (http://localhost:80 becomes http://localhost). 3. Remove duplicate slashes. 4. Remove unnecessary dots from path. 5. Sort query parameters. 6. Decode host IP into decimal numbers. 7. Handle escape values. 8. Decode Punycode domains into UTF8 representation.
func NormalizeString ¶
NormalizeString returns normalized URL string. It's a shortcut for Parse() and Normalize() funcs.
func ParseUnsafe ¶
func RealLinkClear ¶
делает запрос и смотрит если прокси
func RealLinkFasthttp ¶
делает запрос и смотрит если прокси
func RemoveURLParams ¶
func ResolveString ¶
Resolve resolves the URL host to its IP address. It's a shortcut for Parse() and Resolve() funcs.
func SplitHostPort ¶
SplitHostPort splits network address of the form "host:port" into host and port. Unlike net.SplitHostPort(), it doesn't remove brackets from [IPv6] host and it accepts net/url.URL struct instead of a string.
Types ¶
This section is empty.