diff options
author | Jacob Gadikian <[email protected]> | 2023-08-08 03:40:31 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2023-08-07 19:40:31 +0000 |
commit | b32f265ecad60404c3818cc9d42e367a8e4eb7d4 (patch) | |
tree | 16d79c3ad7ddf0cc6f7915d1e47bdd6d269bf8d5 /cmd | |
parent | 431adc09805972196314b2b188904942cbe5dfee (diff) | |
download | caddy-b32f265ecad60404c3818cc9d42e367a8e4eb7d4.tar.gz caddy-b32f265ecad60404c3818cc9d42e367a8e4eb7d4.zip |
ci: Use gofumpt to format code (#5707)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/commandfuncs.go | 2 | ||||
-rw-r--r-- | cmd/commands.go | 2 | ||||
-rw-r--r-- | cmd/storagefuncs.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/cmd/commandfuncs.go b/cmd/commandfuncs.go index dde870be6..837526ed0 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 d1b76f446..3bf47df4e 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 75790ab7b..a9f1bcac8 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)), } |