Documentation ¶
Overview ¶
Package url define URL utilites
Index ¶
- Constants
- func Base(URL string, defaultSchema string) (string, string)
- func Dir(URL string) string
- func Equals(URL1, URL2 string) bool
- func Host(URL string) string
- func IsRelative(location string) bool
- func IsSchemeEquals(URL1, URL2 string) bool
- func Join(baseURL string, elements ...string) string
- func JoinUNC(baseURL string, fragments ...string) string
- func Normalize(URL, scheme string) string
- func Path(URL string) string
- func Scheme(URL, defaultSchema string) string
- func SchemeExtensionURL(URL string) string
- func Split(URL, defaultScheme string) (string, string)
Constants ¶
View Source
const (
//Localhost default host
Localhost = "localhost"
)
Variables ¶
This section is empty.
Functions ¶
func IsRelative ¶ added in v0.12.2
IsRelative returns true if location is relative path
func IsSchemeEquals ¶ added in v0.4.0
IsSchemeEquals returns true if scheme is equals
func JoinUNC ¶ added in v0.14.0
JoinUNC joins base URL with path elements, it support '.' or '..' elements
func SchemeExtensionURL ¶
SchemeExtensionURL extract scheme extension or empty string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.