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/utils.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkg/utils.go') 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 -- cgit v1.2.3