commands: Use consistent style when describing subcommands

Closes #12897

Change-Id: Ib27a4a7b540d45243e6252db769d4b9fb7447718
Signed-off-by: Rohan Hasabe <rohanhasabe8@gmail.com>
This commit is contained in:
Rohan Hasabe
2024-10-13 22:10:38 -04:00
committed by Bjørn Erik Pedersen
parent 4985be1a4a
commit 6b5e117a12
16 changed files with 27 additions and 26 deletions

View File

@@ -25,8 +25,8 @@ import (
func newEnvCommand() simplecobra.Commander {
return &simpleCommand{
name: "env",
short: "Print Hugo version and environment info",
long: "Print Hugo version and environment info. This is useful in Hugo bug reports",
short: "Display version and environment info",
long: "Display version and environment info. This is useful in Hugo bug reports",
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
r.Printf("%s\n", hugo.BuildVersionString())
r.Printf("GOOS=%q\n", runtime.GOOS)
@@ -61,8 +61,8 @@ func newVersionCmd() simplecobra.Commander {
r.Println(hugo.BuildVersionString())
return nil
},
short: "Print Hugo version and environment info",
long: "Print Hugo version and environment info. This is useful in Hugo bug reports.",
short: "Display version",
long: "Display version and environment info. This is useful in Hugo bug reports.",
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},