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

	return group.Gid, nil
}