Exemple #1
0
func (u *DefGroup) Exists() (interface{}, error) {
	_, err := group.LookupGroup(u.groupname)
	if err != nil {
		return false, nil
	}
	return true, nil
}
Exemple #2
0
func (u *DefGroup) Gid() (interface{}, error) {
	group, err := group.LookupGroup(u.groupname)
	if err != nil {
		return "", nil
	}

	return group.Gid, nil
}