utils

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandHome deprecated

func ExpandHome(path string) (string, error)

ExpandHome expands the ~ character to the user's home directory. Returns an error if home directory cannot be determined.

Deprecated: Use github.com/arthur-debert/dodot/pkg/paths.ExpandHome instead. This function will be removed in a future version.

func GetHomeDirectory deprecated

func GetHomeDirectory() (string, error)

GetHomeDirectory returns the user's home directory. It first tries os.UserHomeDir(), then falls back to the HOME environment variable. If both fail, it returns an error rather than using dangerous defaults.

Deprecated: Use github.com/arthur-debert/dodot/pkg/paths.GetHomeDirectory instead. This function will be removed in a future version.

func GetHomeDirectoryWithDefault deprecated

func GetHomeDirectoryWithDefault(defaultDir string) string

GetHomeDirectoryWithDefault returns the user's home directory or a default value. This should only be used in contexts where a default is acceptable.

Deprecated: Use github.com/arthur-debert/dodot/pkg/paths.GetHomeDirectoryWithDefault instead. This function will be removed in a future version.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL