Documentation
¶
Index ¶
- func CanSudoWithoutPassword() bool
- func Chown(path string, uid, gid int) error
- func Confirm(prompt string) bool
- func EnsureSudoCached() error
- func GetCurrentUser() (*user.User, error)
- func GetFileOwner(path string) (uid, gid int, err error)
- func HasSudo() bool
- func IsOwnedByCurrentUser(path string) (bool, error)
- func IsOwnedByUser(path string, uid int) (bool, error)
- func IsRoot() bool
- func MkdirAll(path string, perm os.FileMode) error
- func NeedsPrivilege() bool
- func RunCommand(cmd *exec.Cmd) error
- func RunCommandSilent(cmd *exec.Cmd) error
- func WrapWithSudo(cmd *exec.Cmd) (*exec.Cmd, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanSudoWithoutPassword ¶
func CanSudoWithoutPassword() bool
func EnsureSudoCached ¶
func EnsureSudoCached() error
func GetCurrentUser ¶
func GetFileOwner ¶
func IsOwnedByCurrentUser ¶
func NeedsPrivilege ¶
func NeedsPrivilege() bool
func RunCommand ¶
func RunCommandSilent ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.