interaction

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanSudoWithoutPassword

func CanSudoWithoutPassword() bool

func Chown

func Chown(path string, uid, gid int) error

func Confirm

func Confirm(prompt string) bool

func EnsureSudoCached

func EnsureSudoCached() error

func GetCurrentUser

func GetCurrentUser() (*user.User, error)

func GetFileOwner

func GetFileOwner(path string) (uid, gid int, err error)

func HasSudo

func HasSudo() bool

func IsOwnedByCurrentUser

func IsOwnedByCurrentUser(path string) (bool, error)

func IsOwnedByUser

func IsOwnedByUser(path string, uid int) (bool, error)

func IsRoot

func IsRoot() bool

func MkdirAll

func MkdirAll(path string, perm os.FileMode) error

func NeedsPrivilege

func NeedsPrivilege() bool

func RunCommand

func RunCommand(cmd *exec.Cmd) error

func RunCommandSilent

func RunCommandSilent(cmd *exec.Cmd) error

func WrapWithSudo

func WrapWithSudo(cmd *exec.Cmd) (*exec.Cmd, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL