Skip to content

Commit

Permalink
emit type once for all forms of an option
Browse files Browse the repository at this point in the history
Signed-off-by: Phil Prasek <[email protected]>
  • Loading branch information
prasek committed Nov 1, 2024
1 parent 8980ba2 commit bf009ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions temporalcli/commandsgen/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ func (w *docWriter) writeOptions(prefix string, options []Option, c *Command) {

for _, o := range options {
// option name and alias
w.fileMap[fileName].WriteString(fmt.Sprintf("**--%s** _%s_", o.Name, o.Type))
w.fileMap[fileName].WriteString(fmt.Sprintf("**--%s**", o.Name))
if len(o.Short) > 0 {
w.fileMap[fileName].WriteString(fmt.Sprintf(", **-%s** _%s_", o.Short, o.Type))
w.fileMap[fileName].WriteString(fmt.Sprintf(", **-%s**", o.Short))
}
w.fileMap[fileName].WriteString("\n\n")
w.fileMap[fileName].WriteString(fmt.Sprintf(" _%s_\n\n", o.Type))

// description
w.fileMap[fileName].WriteString(encodeJSONExample(o.Description))
Expand Down

0 comments on commit bf009ca

Please sign in to comment.