Update the documentation generation logic to include values in Type and Default columns for boolean flags that have true as a default value.
This change addresses the need for users to differentiate between boolean flags that require explicit negation.
Signed-off-by: George Margaritis <gmargaritis@protonmail.com>
Cobra allows for aliases to be defined for a command, but only allows these
to be defined at the same level (for example, `docker image ls` as alias for
`docker image list`). Our CLI has some commands that are available both as a
top-level shorthand as well as `docker <object> <verb>` subcommands. For example,
`docker ps` is a shorthand for `docker container ps` / `docker container ls`.
This patch introduces a custom "aliases" annotation that can be used to print
all available aliases for a command. While this requires these aliases to be
defined manually, in practice the list of aliases rarely changes, so maintenance
should be minimal.
As a convention, we could consider the first command in this list to be the
canonical command, so that we can use this information to add redirects in
our documentation in future.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The os/ioutil package is now deprecated, so replace with os. While at it,
also replace its used for test.TempDir() in tests, which is easier to use
as it is automatically cleaned up.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>