func NewGroup(sysGroup system.Group) *Group { groupname := sysGroup.Groupname() exists, _ := sysGroup.Exists() gid, _ := sysGroup.Gid() return &Group{ Groupname: groupname, Exists: exists.(bool), Gid: gid.(string), } }
func NewGroup(sysGroup system.Group, ignoreList []string) *Group { groupname := sysGroup.Groupname() exists, _ := sysGroup.Exists() g := &Group{ Groupname: groupname, Exists: exists.(bool), } if !contains(ignoreList, "stderr") { gid, _ := sysGroup.Gid() g.Gid = gid.(string) } return g }
func NewGroup(sysGroup system.Group, config util.Config) (*Group, error) { groupname := sysGroup.Groupname() exists, _ := sysGroup.Exists() g := &Group{ Groupname: groupname, Exists: exists.(bool), } if !contains(config.IgnoreList, "stderr") { gid, _ := sysGroup.Gid() g.Gid = gid.(string) } return g, nil }
func NewGroup(sysGroup system.Group, config util.Config) (*Group, error) { groupname := sysGroup.Groupname() exists, _ := sysGroup.Exists() g := &Group{ Groupname: groupname, Exists: exists, } if !contains(config.IgnoreList, "stderr") { if gid, err := sysGroup.GID(); err == nil { g.GID = gid } } return g, nil }