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/utils.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/utils.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/utils.go b/pkg/utils.go index 3920737..2c9e768 100644 --- a/pkg/utils.go +++ b/pkg/utils.go @@ -28,17 +28,17 @@ func FilterSlice[T any](slice *[]T, predicate func(T) bool) { func makeDirectoriesHierarchy(dir string, perms *Permissions) (Status, error) { if _, err := os.Lstat(dir); err != nil { if errors.Is(err, fs.ErrNotExist) { - if _, err = makeDirectoriesHierarchy(filepath.Dir(dir), perms); err != nil { + if _, err := makeDirectoriesHierarchy(filepath.Dir(dir), perms); err != nil { return BROKEN, err } - var m int - if m, err = perms.mode.Int(); err != nil { + m, err := perms.mode.Int() + if err != nil { return BROKEN, err } - if err = os.Mkdir(dir, fs.FileMode(m)); err != nil { + if err := os.Mkdir(dir, fs.FileMode(m)); err != nil { return BROKEN, err } - if _, err = perms.resolve(dir); err != nil { + if _, err := perms.resolve(dir); err != nil { return BROKEN, err } return REPAIRED, nil |