Documentation ¶
Index ¶
- func AppendQueryParam(url string, param interface{}) string
- func AppendQueryParamByTag(url string, param interface{}, tag string) string
- func Base(url string) string
- func Clean(p string) string
- func PathBase(url string) string
- func QueryParam(param any) string
- func QueryParamByTag(param any, tag string) string
- func RelativeURLToAbsoluteURL(curURL string, baseURL string) (string, error)
- func ResolveURL(u *url.URL, p string) string
- func SetTag(t string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendQueryParam ¶ added in v1.5.11
func AppendQueryParamByTag ¶ added in v1.5.11
func Clean ¶
Clean is the URL version of path.Clean, it returns a canonical URL path for p, eliminating . and .. elements.
The following rules are applied iteratively until no further processing can be done:
- Replace multiple slashes with a single slash.
- Eliminate each . path name element (the current directory).
- Eliminate each inner .. path name element (the parent directory) along with the non-.. element that precedes it.
- Eliminate .. elements that begin a rooted path: that is, replace "/.." by "/" at the beginning of a path.
If the result of this process is an empty string, "/" is returned
func QueryParam ¶ added in v1.5.11
func QueryParamByTag ¶ added in v1.5.11
func RelativeURLToAbsoluteURL ¶
RelativeURLToAbsoluteURL 相对URL转绝对URL
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.