diff --git a/argument.go b/argument.go index 998622f..42cf53b 100644 --- a/argument.go +++ b/argument.go @@ -42,7 +42,7 @@ func (a *Argument) isOptional() bool { func (a *Argument) inBrackets() string { if a.isOptional() { - return fmt.Sprintf("<%s?>", a.name) + return fmt.Sprintf("[<%s>]", a.name) } return fmt.Sprintf("<%s>", a.name) diff --git a/help_test.go b/help_test.go index 7b1b3db..70def9d 100644 --- a/help_test.go +++ b/help_test.go @@ -47,11 +47,11 @@ func TestCommand_renderHelp(t *testing.T) { test v1.2.3-rc10: test command Usage: - test [flags] + test [flags] [] Arguments: - some arg (type: time.Time) - another arg (type: int, default: "123") + some arg (type: time.Time) + [] another arg (type: int, default: "123") Flags: --help Print help. (type: bool, default: "false")