Skip to content

Commit

Permalink
Fix spacing in String conversion of commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuixz committed Aug 20, 2024
1 parent edc8293 commit 54dbf17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/slack/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ func (arg Argument) String() string {
if arg.required {
return argname
} else {
return " [" + argname + "]"
return "[" + argname + "]"
}
}

func (c Command) String() string {
output := fmt.Sprintf("`%s`: %s", c.trigger, c.description)
output += fmt.Sprintf("\nUsage of `%s`:", c.trigger)
output += fmt.Sprintf("`%s %s`", c.trigger, lo.Reduce(c.arguments,
output += fmt.Sprintf(`%s`, lo.Reduce(c.arguments,
func(o string, x Argument, _ int) string {
return fmt.Sprintf("%s %s", o, x.String())
}, ""))
}, c.trigger))
for _, arg := range c.arguments {
output += fmt.Sprintf("\n\t`%s`: %s", arg.name, arg.description)
}
Expand Down

0 comments on commit 54dbf17

Please sign in to comment.