feat(cmd): Add missing examples and slightly reword#312
Conversation
85808d7 to
d15f2ee
Compare
Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
d15f2ee to
7c05f87
Compare
| cmd.CmdTypeList: { | ||
| { | ||
| Description: "List all certificates", | ||
| Description: "List all certificates across metros", |
There was a problem hiding this comment.
Does including across metros here add anything? All commands work across all metros.
There was a problem hiding this comment.
True
Probably only makes sense if there's also an example that has --metro=smth and that says on a single metro"
| { | ||
| Description: "List instances as a table with additional fields", | ||
| Commands: []string{"unikraft instance list -f +resources -o table"}, | ||
| }, |
There was a problem hiding this comment.
Ah. I'm not entirely sure about some of these.
The issue is that we should use the examples to give info specific to this command. But things like --field, --sort, --filter, --watch, --dry-run, etc, apply to everything. I don't really know where these need to appear in the help hierarchy to make them better, but I don't want to add them to every single place - it's a lot of repetition (and e.g. suppose we update the --watch flag - then we have to update it everywhere).
There was a problem hiding this comment.
also true
If I remember correctly in kraftkit we were adding them ocassionally to some commands to show/remind people how to use them
Of course there should be a better way to do this
Maybe if we would show them only in the top level help?
There was a problem hiding this comment.
I think we should show common functionality for each command - but we shouldn't have examples that explain the flags like --sort unless that really is a super used operation for exactly that command.
Instead, we should expand the help for --sort and such for those cases.
There was a problem hiding this comment.
Hmm, okay, makes sense, I'll do a pass through it and hand-curate
Closes: TOOL-846