From bf009caf4ea0a09013b34f637ea94c600bce47b8 Mon Sep 17 00:00:00 2001 From: Phil Prasek Date: Fri, 1 Nov 2024 10:13:41 -0700 Subject: [PATCH] emit type once for all forms of an option Signed-off-by: Phil Prasek --- temporalcli/commandsgen/docs.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/temporalcli/commandsgen/docs.go b/temporalcli/commandsgen/docs.go index f67d99f2..fd00f247 100644 --- a/temporalcli/commandsgen/docs.go +++ b/temporalcli/commandsgen/docs.go @@ -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))