From f9b9c3a8c19d14641fdb9abc4b87709405b36cb1 Mon Sep 17 00:00:00 2001 From: Gregory Kurtzer Date: Wed, 8 Sep 2021 20:37:58 -0700 Subject: [PATCH] Linting fixes --- internal/app/wwctl/kernel/imprt/main.go | 2 +- internal/app/wwctl/overlay/chown/main.go | 2 +- internal/pkg/oci/cache.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/app/wwctl/kernel/imprt/main.go b/internal/app/wwctl/kernel/imprt/main.go index e1cd5d7e..4158c403 100644 --- a/internal/app/wwctl/kernel/imprt/main.go +++ b/internal/app/wwctl/kernel/imprt/main.go @@ -17,7 +17,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error { for _, arg := range args { // Checking if container flag was set, then overwriting OptRoot if OptContainer != "" { - if container.ValidSource(OptContainer) == true { + if container.ValidSource(OptContainer) { OptRoot = container.RootFsDir(OptContainer) } else { wwlog.Printf(wwlog.ERROR, " %s is not a valid container", OptContainer) diff --git a/internal/app/wwctl/overlay/chown/main.go b/internal/app/wwctl/overlay/chown/main.go index 513ecdef..7946991b 100644 --- a/internal/app/wwctl/overlay/chown/main.go +++ b/internal/app/wwctl/overlay/chown/main.go @@ -78,7 +78,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error { var updateNodes []node.NodeInfo for _, node := range nodes { - if SystemOverlay == true && node.SystemOverlay.Get() == overlayName { + if SystemOverlay && node.SystemOverlay.Get() == overlayName { updateNodes = append(updateNodes, node) } else if node.RuntimeOverlay.Get() == overlayName { updateNodes = append(updateNodes, node) diff --git a/internal/pkg/oci/cache.go b/internal/pkg/oci/cache.go index 1f4231b4..227fd439 100644 --- a/internal/pkg/oci/cache.go +++ b/internal/pkg/oci/cache.go @@ -53,7 +53,7 @@ func (c *Cache) checkEntry(id string) (string, error) { func (c *Cache) createEntry(id string) (string, error) { path := filepath.Join(c.rootfsDir(), id) - if err := os.MkdirAll(path, 755); err != nil { + if err := os.MkdirAll(path, 0755); err != nil { return "", err }