Skip to content

Commit

Permalink
cmd/doc: fixed outputs label
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Alba <sam.alba@gmail.com>
  • Loading branch information
samalba committed Jun 7, 2021
1 parent a002d2e commit 1bfb8d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/dagger/cmd/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ func loadCode(packageName string) (*compiler.Value, error) {

// printValuesText (text) formats an array of Values on stdout
func printValuesText(iw io.Writer, libName string, values []*compiler.Value) {
fmt.Fprintf(iw, "\n%sInputs:\n", textPadding)
w := tabwriter.NewWriter(iw, 0, 4, len(textPadding), ' ', 0)
for _, i := range values {
docStr := terminalTrim(common.ValueDocString(i))
Expand Down Expand Up @@ -261,6 +260,7 @@ func PrintDoc(ctx context.Context, w io.Writer, packageName string, val *compile
fmt.Fprintf(w, "\n%sInputs: none\n", textPadding)
break
}
fmt.Fprintf(w, "\n%sInputs:\n", textPadding)
printValuesText(w, name, inp)
case markdownFormat:
fmt.Fprintf(w, "#### %s Inputs\n\n", mdEscape(name))
Expand All @@ -281,6 +281,7 @@ func PrintDoc(ctx context.Context, w io.Writer, packageName string, val *compile
fmt.Fprintf(w, "\n%sOutputs: none\n", textPadding)
break
}
fmt.Fprintf(w, "\n%sOutputs:\n", textPadding)
printValuesText(w, name, out)
case markdownFormat:
fmt.Fprintf(w, "#### %s Outputs\n\n", mdEscape(name))
Expand Down

0 comments on commit 1bfb8d4

Please sign in to comment.