Documentation
¶
Index ¶
- func AppendPaths(u *url.URL, paths ...string) (ep *url.URL)
- func Copy(src *url.URL) *url.URL
- func CopyWithQuery(src *url.URL, query url.Values) *url.URL
- func GetURLFilePath(u *url.URL) string
- func MustJoin(first string, parts ...string) string
- func Parse(rawURL string) (*url.URL, error)
- func ParseOrFatal(l *logrusx.Logger, in string) *url.URL
- func ParseOrPanic(in string) *url.URL
- func ParseRequestURIOrFatal(l *logrusx.Logger, in string) *url.URL
- func ParseRequestURIOrPanic(in string) *url.URL
- func SetQuery(u *url.URL, query url.Values) (ep *url.URL)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendPaths ¶
AppendPaths appends the provided paths to the url.
func CopyWithQuery ¶
CopyWithQuery returns a copy of the input url with the given query parameters
func GetURLFilePath ¶
GetURLFilePath returns the path of a URL that is compatible with the runtime os filesystem
func Parse ¶
Parse parses rawURL into a URL structure with special handling for file:// URLs
File URLs with relative paths (file://../file, ../file) will be returned as a url.URL object without the Scheme set to "file". This is because the file scheme does not support relative paths. Make sure to check for both "file" or "" (an empty string) in URL.Scheme if you are looking for a file path.
Use the companion function GetURLFilePath() to get a file path suitable for the current operating system.
func ParseOrFatal ¶
ParseOrFatal parses a url or fatals.
func ParseRequestURIOrFatal ¶
ParseRequestURIOrFatal parses a request uri or fatals.
func ParseRequestURIOrPanic ¶
ParseRequestURIOrPanic parses a request uri or panics.
Types ¶
This section is empty.