Carry #102 : improvements for command help#126
Conversation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
788a374 to
5ddfb29
Compare
There was a problem hiding this comment.
It's unfortunate we need the back-tics in the string; having to do all the concatenation and \n\n for new lines looks tedious
There was a problem hiding this comment.
Yeah 😓 I'm looking around to see a better way to do that (and hopefully, I'll find one).
There was a problem hiding this comment.
Yup, also thinking what a solution would be. Perhaps a separate TOML file containing the strings/descriptions? idk
There was a problem hiding this comment.
@thaJeztah I wonder, I could also use backticks to not have to escape the carriage-return but.. I had trouble with them for these (backticks inside backticks…).
There was a problem hiding this comment.
Thinking if GoDoc can be used somehow, I know @calavera did some experimenting in this area in this PR moby/moby#16125. However (obviously) that's used to generate external documentation, not for usage in the output of the software itself
There was a problem hiding this comment.
spf13/cobra has a good way of dealing with this I think: https://github.com/spf13/cobra#manually-create-rootcmd
There was a problem hiding this comment.
Looks like that also uses back-tics for quotes. Still might be worth looking into; something that's easy to maintain and reusable
Big thanks to @bohai :) Signed-off-by: Vincent Demeester <vincent@sbr.pm>
5ddfb29 to
7895788
Compare
|
I'm closing this for now, will handle this when migration to |
Closes #101, Carrying #102 and makes help on commands (description, usage and such) more close to what
docker-composedoes 🐰. It is not mandatory but 😝.It looks like that :
docker-compose)At some point we should remove the
WARNand make it clear elsewhere (like on the main help/usage command), but that's another story/PR 😉./cc @dnephin @aanand @ibuildthecloud
🐸