Documentation
¶
Overview ¶
Package pathx expands environment variables and tilde prefixes in paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Expand ¶
Expand resolves environment variables ($VAR, ${VAR}, ${VAR:-default}) and tilde (~, ~/) into a clean, platform-specific path.
func ExpandTilde ¶
ExpandTilde resolves a leading tilde (~, ~/) into the user's home directory resolved via HomeDir. Paths without a tilde prefix are returned unchanged, as are tilde paths when the home directory cannot be resolved.
func ExpandUncleaned ¶ added in v0.9.0
ExpandUncleaned resolves environment variables and tilde like Expand but skips filepath.Clean, so the text keeps the form it was typed in: "./tool" stays "./tool" and "tool/" keeps its separator.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.