From 4a254746de7246ddf8ac131f734f224d49e927b7 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 2 Jun 2024 01:17:36 +0200 Subject: chore(gonf): removed opinionated static checkers --- pkg/permissions.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pkg/permissions.go') diff --git a/pkg/permissions.go b/pkg/permissions.go index 9a46b64..d292ae5 100644 --- a/pkg/permissions.go +++ b/pkg/permissions.go @@ -1,7 +1,7 @@ package gonf import ( - "errors" + "fmt" "io/fs" "os" "os/user" @@ -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 } } @@ -75,7 +75,7 @@ func (p *Permissions) resolve(filename string) (Status, error) { status = REPAIRED } } else { - return BROKEN, errors.New("unsupported operating system") + return BROKEN, fmt.Errorf("unsupported operating system") } } return status, nil -- cgit v1.2.3