1
0
mirror of https://github.com/lxc/incus.git synced 2026-02-05 09:46:19 +01:00

incus-user: Fix gofumpt

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
Stéphane Graber
2025-03-17 18:02:52 -04:00
parent 67149dceae
commit 3b6ef77757
2 changed files with 8 additions and 6 deletions

View File

@@ -18,9 +18,11 @@ import (
"github.com/lxc/incus/v6/shared/logger"
)
var mu sync.RWMutex
var connections uint64
var transactions uint64
var (
mu sync.RWMutex
connections uint64
transactions uint64
)
var projectNames []string
@@ -44,7 +46,7 @@ func (c *cmdDaemon) Run(cmd *cobra.Command, args []string) error {
}
// Create storage.
err := os.MkdirAll(internalUtil.VarPath("users"), 0700)
err := os.MkdirAll(internalUtil.VarPath("users"), 0o700)
if err != nil && !os.IsExist(err) {
return fmt.Errorf("Couldn't create storage: %w", err)
}
@@ -150,7 +152,7 @@ func (c *cmdDaemon) Run(cmd *cobra.Command, args []string) error {
return fmt.Errorf("Unable to setup unix socket: %w", err)
}
err = os.Chmod(unixPath, 0660)
err = os.Chmod(unixPath, 0o660)
if err != nil {
return fmt.Errorf("Unable to set socket permissions: %w", err)
}

View File

@@ -178,7 +178,7 @@ func serverSetupUser(uid uint32) error {
defer revert.Fail()
// Create certificate directory.
err = os.MkdirAll(userPath, 0700)
err = os.MkdirAll(userPath, 0o700)
if err != nil {
return fmt.Errorf("Failed to create user directory: %w", err)
}