aboutsummaryrefslogtreecommitdiff
path: root/util/util.go
diff options
context:
space:
mode:
authorJoseph Richey <joerichey94@gmail.com>2017-10-19 03:37:54 -0700
committerJoseph Richey <joerichey94@gmail.com>2017-10-19 03:54:50 -0700
commit3269bc539e52cdced8c03a628e4fdf22942ece4b (patch)
tree062792c21fe6751e14f827616bf454e62210a1dc /util/util.go
parentfe76f6f1cc71c75bc1124f4fe3171c679c06aa1c (diff)
util: Add CheckIfRoot
Replace IsUserRoot with CheckIfRoot. This allows all functions to use the same error handling when a user is not root.
Diffstat (limited to 'util/util.go')
-rw-r--r--util/util.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/util/util.go b/util/util.go
index ed78519..df24a99 100644
--- a/util/util.go
+++ b/util/util.go
@@ -117,8 +117,3 @@ func AtoiOrPanic(input string) int {
}
return i
}
-
-// IsUserRoot checks if the effective user is root.
-func IsUserRoot() bool {
- return CurrentUserID() == 0
-}