Documentation ¶
Index ¶
- func AddToSudoers(user string) (result bool)
- func AllGroups() (g []string)
- func AsString(b []byte) string
- func Check(m string, e error, format ...interface{})
- func CheckSSHKeys()
- func CopyFile(src string, dst string)
- func Critical(m string, f ...interface{})
- func CurrentUser() *user.User
- func Debug(m string, f ...interface{})
- func Dependencies()
- func FileExists(f string) (e bool)
- func GetUserGroups(user string) (groups []string)
- func Info(m string, f ...interface{})
- func IsInstalled(pkg string) (i bool)
- func IsRoot() (r bool)
- func Logger(t color.Attribute, m string, f ...interface{})
- func NewGroup(group string)
- func ResetRoot()
- func RunAs(u string, f func()) func()
- func ScaffoldRoot()
- func ScaffoldUser()
- func SetHostname(hostname string)
- func SetTimezone()
- func Success(m string, f ...interface{})
- func UserCommand(base string, args ...string) ([]byte, error)
- func UserToGroup(user string, group string)
- func Warning(m string, f ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToSudoers ¶
AddToSudoers adds a user to the sudoers file.
func CheckSSHKeys ¶
func CheckSSHKeys()
CheckSSHKeys ensures SSH keys exist and have the correct permissions.
func Critical ¶
func Critical(m string, f ...interface{})
Critical logs a red message to the console.
func GetUserGroups ¶
GetUserGroups gets the current list of groups for which a user is a member.
func IsInstalled ¶
IsInstalled determines if a package is installed by checking to see if it is in $PATH
func ScaffoldRoot ¶ added in v0.0.4
func ScaffoldRoot()
ScaffoldRoot creates the required system directory structure.
func ScaffoldUser ¶ added in v0.0.4
func ScaffoldUser()
ScaffoldUser creates the required directory structure for the non-root user.
func Success ¶
func Success(m string, f ...interface{})
Success logs a green message to the console.
func UserCommand ¶
UserCommand runs a command with environment variables set for the user.
func UserToGroup ¶
UserToGroup adds a user to a group that is assumed to exist.
Types ¶
This section is empty.