Documentation
¶
Overview ¶
Package paths centralizes home-directory resolution and path expansion.
All home-dir lookups should go through this package instead of calling os.UserHomeDir directly, so tests can stub UserHomeDir and behavior stays consistent (tilde + env expansion) across commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UserHomeDir = os.UserHomeDir
UserHomeDir is mockable for testing. Defaults to os.UserHomeDir.
Functions ¶
func Expand ¶
Expand expands a leading "~" and environment variables in path. "~" alone maps to home; "~/x" maps to $HOME/x. Other values pass through os.ExpandEnv unchanged. On home lookup failure the input is returned with env expansion only.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.