mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-29 07:05:57 +08:00
cmd: fmt: --write -> --overwrite to make it clear it's destructive
This commit is contained in:
@ -244,8 +244,8 @@ provisioning stages.`,
|
||||
|
||||
RegisterCommand(Command{
|
||||
Name: "fmt",
|
||||
Func: cmdFormatConfig,
|
||||
Usage: "[--write] [<path>]",
|
||||
Func: cmdFmt,
|
||||
Usage: "[--overwrite] [<path>]",
|
||||
Short: "Formats a Caddyfile",
|
||||
Long: `
|
||||
Formats the Caddyfile by adding proper indentation and spaces to improve
|
||||
@ -255,7 +255,7 @@ If --write is specified, the output will be written to the config file
|
||||
directly instead of printing it.`,
|
||||
Flags: func() *flag.FlagSet {
|
||||
fs := flag.NewFlagSet("format", flag.ExitOnError)
|
||||
fs.Bool("write", false, "Over-write the output to specified file")
|
||||
fs.Bool("overwrite", false, "Overwrite the input file with the results")
|
||||
return fs
|
||||
}(),
|
||||
})
|
||||
|
Reference in New Issue
Block a user