diff options
author | Julien Dessaux | 2024-06-02 01:17:36 +0200 |
---|---|---|
committer | Julien Dessaux | 2024-06-02 01:17:36 +0200 |
commit | 4a254746de7246ddf8ac131f734f224d49e927b7 (patch) | |
tree | e7b33fb7769864ed7528ae9fe1f59a6a61012351 /pkg/permissions.go | |
parent | fix(gonf): fixed hostflag management (diff) | |
download | gonf-4a254746de7246ddf8ac131f734f224d49e927b7.tar.gz gonf-4a254746de7246ddf8ac131f734f224d49e927b7.tar.bz2 gonf-4a254746de7246ddf8ac131f734f224d49e927b7.zip |
chore(gonf): removed opinionated static checkers
Diffstat (limited to '')
-rw-r--r-- | pkg/permissions.go | 12 |
1 files changed, 6 insertions, 6 deletions
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 |