Documentation
¶
Overview ¶
Package urlparser parses and validates URLs with support for wildcards. This is an internal package that provides custom URL parsing for the uncors project.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Parse ¶
Parse parses raw URL string into the net/url URL struct. It uses the url.Parse() internally, but it slightly changes its behavior:
- It forces the default scheme and port to http
- It favors absolute paths over relative ones, thus "example.com" is parsed into url.Host instead of url.Path.
- It lowercase's the Host (not only the Scheme).
func ParseWithDefaultScheme ¶
ParseWithDefaultScheme parses raw URL string with a custom default scheme. If the URL doesn't have a scheme, the provided scheme will be used. If scheme is empty, the URL will be parsed without a default scheme.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.