You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks as though description newlines are stripped, which means printing any type of structured output inside of descriptions will break. It looks like this is due to description being added to help, and thus help being passed into the line wrapping functionality causes it to trim those things.
Some examples of things that I've seen other cli tools have in their "about/description":
ASCII logo art
licenses (by themselves I guess don't require non-wrapping, in many scenarios, but do span many lines, and can complicate things if mixed with other description output)
version/build/author/link info (see example below)
I guess my question is, does this make sense to have as a supported feature? If so, should it be toggleable? E.g. kong.Description() and kong.LongDescription() or kong.FormattedDescription(), maybe (with a warning that it won't obey wrapping?)?
The text was updated successfully, but these errors were encountered:
Kong's help output is fed through Go's doc formatter. I think I did that primarily to support line wrapping and integration, but I do agree that makes it difficult to control the output.
I had a comment about Help() command methods, then deleted it because I thought it might be user error, but it seems still there.
Indenting lines with a few spaces seemed to get go to avoid doing further formatting. Is go's doc formatter markdown or something?
Anyway, my use case is I wanted to add a yaml snippet in the command help text (command takes a yaml file).
The normal behavior seems fine for most things, but a way to get out of it would be helpful for that. That said, I don't think I realized it was formatting it at all, so in my own use case I don't rely on the formatting currently.
Looks as though description newlines are stripped, which means printing any type of structured output inside of descriptions will break. It looks like this is due to description being added to help, and thus help being passed into the line wrapping functionality causes it to trim those things.
Some examples of things that I've seen other cli tools have in their "about/description":
I guess my question is, does this make sense to have as a supported feature? If so, should it be toggleable? E.g.
kong.Description()
andkong.LongDescription()
orkong.FormattedDescription()
, maybe (with a warning that it won't obey wrapping?)?The text was updated successfully, but these errors were encountered: