chore(gonf): fix errcheck and shadow errors

This commit is contained in:
Julien Dessaux 2024-05-01 16:23:08 +02:00
parent 72be13c3e9
commit 8b9195e3e3
Signed by: adyxax
GPG key ID: F92E51B86E07177E
15 changed files with 65 additions and 80 deletions

View file

@ -29,10 +29,10 @@ func (p *Permissions) resolve(filename string) (Status, error) {
if group, err := user.LookupGroup(p.group.String()); err != nil {
return BROKEN, err
} else {
if groupId, err := strconv.Atoi(group.Gid); err != nil {
if groupID, err := strconv.Atoi(group.Gid); err != nil {
return BROKEN, err
} else {
g = &IntValue{groupId}
g = &IntValue{groupID}
p.group = g
}
}
@ -46,10 +46,10 @@ func (p *Permissions) resolve(filename string) (Status, error) {
if user, err := user.Lookup(p.user.String()); err != nil {
return BROKEN, err
} else {
if userId, err := strconv.Atoi(user.Uid); err != nil {
if userID, err := strconv.Atoi(user.Uid); err != nil {
return BROKEN, err
} else {
u = &IntValue{userId}
u = &IntValue{userID}
p.group = u
}
}