Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUriIsRelative = errors.New("uri is relative")
Functions ¶
This section is empty.
Types ¶
type Uri ¶
type Uri struct {
// contains filtered or unexported fields
}
Uri define a read-only absolute URI object.
func Parse ¶
Parse parses an URI and normalize it. Raw query args are copied and stored if extractQuery is true.
func ParseBytes ¶
ParseBytes parses an URI and normalize it. Raw query args are copied and stored if extractQuery is true.
func (*Uri) Hash ¶
Hash returns hash of URI: bang for https://www.example.com:8080/foo/bar?q=baz#bang
func (*Uri) Host ¶
Host returns host of URI: www.example.com:8080 for https://www.example.com:8080/foo/bar?q=baz#bang
func (*Uri) Path ¶
Path returns normalized path of URI: /foo/bar for https://www.example.com:8080/foo/bar?q=baz#bang
func (*Uri) QueryString ¶
QueryBytes returns extracted query bytes (extractQuery must be true when calling Parse / ParseBytes): q=baz for https://www.example.com:8080/foo/bar?q=baz#bang
func (*Uri) Scheme ¶
Scheme returns scheme of URI: https for https://www.example.com:8080/foo/bar?q=baz#bang