MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / GetUsername

Function GetUsername

agent/utils/files/utils.go:65–71  ·  view source on GitHub ↗
(uid uint32)

Source from the content-addressed store, hash-verified

63}
64
65func GetUsername(uid uint32) string {
66 usr, err := user.LookupId(strconv.Itoa(int(uid)))
67 if err != nil {
68 return ""
69 }
70 return usr.Username
71}
72
73func GetGroup(gid uint32) string {
74 usr, err := user.LookupGroupId(strconv.Itoa(int(gid)))

Callers 2

NewFileInfoFunction · 0.85
processFilesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected