Documentation ¶
Overview ¶
Package path implements a strongly typed path string. It enforces a forward slash ("/") separator, and and insures all paths end with a separator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Path ¶
type Path string
func New ¶
New creates a path from a string, with the following rules:
Removes all URL prefixes. Reduces two or more "/" to one. Appends a "/" if there are no "/" in the string. Removes all characters after the last "/".
If input is empty or nil, return nil path and error.
func (*Path) IsAbsolute ¶
Returns true of path starts with "/", false otherwise.
Click to show internal directories.
Click to hide internal directories.