MCPcopy Create free account
hub / github.com/eth-easl/dirigent / IsRoot

Function IsRoot

pkg/utils/utils.go:48–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48func IsRoot() bool {
49 currentUser, err := user.Current()
50 if err != nil {
51 log.Fatalf("[isRoot] Unable to get current user: %s", err)
52 }
53 return currentUser.Username == "root"
54}

Callers 2

mainFunction · 0.92
mainFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected