From 3269bc539e52cdced8c03a628e4fdf22942ece4b Mon Sep 17 00:00:00 2001 From: Joseph Richey Date: Thu, 19 Oct 2017 03:37:54 -0700 Subject: util: Add CheckIfRoot Replace IsUserRoot with CheckIfRoot. This allows all functions to use the same error handling when a user is not root. --- util/util.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'util/util.go') 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 -} -- cgit v1.2.3