Documentation
¶
Overview ¶
package path provides a simple wrapper around a string path that can expand the users home directory, a common CLI need. Might be extracted into its own library and removed from warg if I find myself needing it in other code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
func (Path) Expand ¶
Expand expands the path to include the home directory if the path is prefixed with `~`. If it isn't prefixed with `~`, the path is returned as-is.
func (Path) MustExpand ¶
MustExpand calls `Expand` and panics on any errors
Click to show internal directories.
Click to hide internal directories.