trunk v0.0.1
vilmibm 2021-03-23 21:38:38 +00:00
parent 253825768b
commit bd0fb8be77
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ import (
const adminGroup = "admin" const adminGroup = "admin"
func IsAdmin(u os.User) (bool, error) { func IsAdmin(u user.User) (bool, error) {
adminGroup, err := user.LookupGroup(adminGroup) adminGroup, err := user.LookupGroup(adminGroup)
if err != nil { if err != nil {
return false, fmt.Errorf("failed to get admin group info: %w", err) return false, fmt.Errorf("failed to get admin group info: %w", err)
@ -34,7 +34,7 @@ func SendLocalEmail(username, subject, body string) error {
cmd.Stdin = bytes.NewBufferString(body) cmd.Stdin = bytes.NewBufferString(body)
if err := cmd.Run(); err != nil { if err := cmd.Run(); err != nil {
return fmt.Errof("failed to send local email: %w", err) return fmt.Errorf("failed to send local email: %w", err)
} }
return nil return nil