MCPcopy Create free account
hub / github.com/kataras/iris / homeDir

Function homeDir

configuration.go:33–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31}
32
33func homeDir() (home string) {
34 u, err := user.Current()
35 if u != nil && err == nil {
36 home = u.HomeDir
37 }
38
39 if home == "" {
40 home = os.Getenv("HOME")
41 }
42
43 if home == "" {
44 if runtime.GOOS == "plan9" {
45 home = os.Getenv("home")
46 } else if runtime.GOOS == "windows" {
47 home = os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
48 if home == "" {
49 home = os.Getenv("USERPROFILE")
50 }
51 }
52 }
53
54 return
55}
56
57func parseYAML(filename string) (Configuration, error) {
58 c := DefaultConfiguration()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…