MCPcopy
hub / github.com/perkeep/perkeep / HomeDir

Function HomeDir

internal/osutil/paths.go:37–43  ·  view source on GitHub ↗

HomeDir returns the path to the user's home directory. It returns the empty string if the value isn't known.

()

Source from the content-addressed store, hash-verified

35// HomeDir returns the path to the user's home directory.
36// It returns the empty string if the value isn't known.
37func HomeDir() string {
38 failInTests()
39 if runtime.GOOS == "windows" {
40 return os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
41 }
42 return os.Getenv("HOME")
43}
44
45// Username returns the current user's username, as
46// reported by the relevant environment variable.

Callers 3

cacheDirFunction · 0.85
camliVarDirOfFunction · 0.85
configDirNamedFunction · 0.85

Calls 1

failInTestsFunction · 0.85

Tested by

no test coverage detected