Documentation
¶
Overview ¶
Package url contains some helper functions to deal with URLs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CutOffPrefix ¶
CutOffPrefix simply cuts off a prefix from a string. It returns the original input string when it doesn't start with the prefix.
func CutOffSchema ¶
CutOffSchema cuts off the schema part of a URL. For example: https://www.google.com would become www.google.com
func CutOffSuffix ¶
CutOffSuffix simply cuts off a suffix from a string. It returns the original input string when it doesn't start with the suffix.
func GetRelativePath ¶
GetRelativePath returns the relative path part of a URL. It can handle both full URLs (with a schema) or just absolute paths. For example:
- https://www.google.com/my/path would become my/path
- /a/cool/path would become a/cool/path
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.