Skip to content

Commit c755960

Browse files
committed
Fix spacing in String conversion of commands
1 parent edc8293 commit c755960

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/slack/command.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ func (arg Argument) String() string {
5353
if arg.required {
5454
return argname
5555
} else {
56-
return " [" + argname + "]"
56+
return "[" + argname + "]"
5757
}
5858
}
5959

6060
func (c Command) String() string {
6161
output := fmt.Sprintf("`%s`: %s", c.trigger, c.description)
6262
output += fmt.Sprintf("\nUsage of `%s`:", c.trigger)
63-
output += fmt.Sprintf("`%s %s`", c.trigger, lo.Reduce(c.arguments,
63+
output += fmt.Sprintf("`%s`", lo.Reduce(c.arguments,
6464
func(o string, x Argument, _ int) string {
6565
return fmt.Sprintf("%s %s", o, x.String())
66-
}, ""))
66+
}, c.trigger))
6767
for _, arg := range c.arguments {
6868
output += fmt.Sprintf("\n\t`%s`: %s", arg.name, arg.description)
6969
}

0 commit comments

Comments
 (0)