summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorJacob Gadikian <jacobgadikian@gmail.com>2023-08-08 03:40:31 +0800
committerGitHub <noreply@github.com>2023-08-07 19:40:31 +0000
commitb32f265ecad60404c3818cc9d42e367a8e4eb7d4 (patch)
tree16d79c3ad7ddf0cc6f7915d1e47bdd6d269bf8d5 /cmd
parent431adc09805972196314b2b188904942cbe5dfee (diff)
ci: Use gofumpt to format code (#5707)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/commandfuncs.go2
-rw-r--r--cmd/commands.go2
-rw-r--r--cmd/storagefuncs.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/cmd/commandfuncs.go b/cmd/commandfuncs.go
index dde870b..837526e 100644
--- a/cmd/commandfuncs.go
+++ b/cmd/commandfuncs.go
@@ -565,7 +565,7 @@ func cmdFmt(fl Flags) (int, error) {
output := caddyfile.Format(input)
if fl.Bool("overwrite") {
- if err := os.WriteFile(formatCmdConfigFile, output, 0600); err != nil {
+ if err := os.WriteFile(formatCmdConfigFile, output, 0o600); err != nil {
return caddy.ExitCodeFailedStartup, fmt.Errorf("overwriting formatted file: %v", err)
}
return caddy.ExitCodeSuccess, nil
diff --git a/cmd/commands.go b/cmd/commands.go
index d1b76f4..3bf47df 100644
--- a/cmd/commands.go
+++ b/cmd/commands.go
@@ -444,7 +444,7 @@ argument of --directory. If the directory does not exist, it will be created.
if dir == "" {
return caddy.ExitCodeFailedQuit, fmt.Errorf("designated output directory and specified section are required")
}
- if err := os.MkdirAll(dir, 0755); err != nil {
+ if err := os.MkdirAll(dir, 0o755); err != nil {
return caddy.ExitCodeFailedQuit, err
}
if err := doc.GenManTree(rootCmd, &doc.GenManHeader{
diff --git a/cmd/storagefuncs.go b/cmd/storagefuncs.go
index 75790ab..a9f1bca 100644
--- a/cmd/storagefuncs.go
+++ b/cmd/storagefuncs.go
@@ -200,7 +200,7 @@ func cmdExportStorage(fl Flags) (int, error) {
hdr := &tar.Header{
Name: k,
- Mode: 0600,
+ Mode: 0o600,
Size: int64(len(v)),
}