cli: add missing doc strings (#14158)

Larpon 2022-04-25 13:41:46 +02:00 committed by Jef Roosens
parent b314b8d8bf
commit 8a5ba0dfc8
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@ fn help_cmd() Command {
} }
} }
// print_help_for_command outputs the help message of `help_cmd`.
pub fn print_help_for_command(help_cmd Command) ? { pub fn print_help_for_command(help_cmd Command) ? {
if help_cmd.args.len > 0 { if help_cmd.args.len > 0 {
mut cmd := help_cmd.parent mut cmd := help_cmd.parent
@ -54,6 +55,7 @@ pub fn print_help_for_command(help_cmd Command) ? {
} }
} }
// help_message returns a generated help message as a `string` for the `Command`.
pub fn (cmd Command) help_message() string { pub fn (cmd Command) help_message() string {
mut help := '' mut help := ''
help += 'Usage: $cmd.full_name()' help += 'Usage: $cmd.full_name()'