MCPcopy Create free account
hub / github.com/perkeep/perkeep / getUserName

Function getUserName

pkg/server/root_normal.go:25–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23)
24
25func getUserName() (string, error) {
26 u, err := user.Current()
27 if err != nil {
28 if v := osutil.Username(); v != "" {
29 return v, nil
30 }
31 return "", err
32 }
33 return u.Name, nil
34}

Callers 1

newRootFromConfigFunction · 0.85

Calls 1

UsernameFunction · 0.92

Tested by

no test coverage detected