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>
The default output for Cobra aliases only shows the subcommand as alias, which
is not very intuitive. This patch changes the output to use the full command
as it would be called by the user.
Before this patch:
aliases: build, b
After this patch:
aliases: docker buildx build, docker buildx b
Note that there's still some improvements to be made; due to how aliases must be
set-up in Cobra, aliases at different "levels" are still not shown. So for example,
`docker build --help` will not show `docker buildx build` as alias, and vice-versa.
This will require additional changes, and can possibly be resolved using custom
metadata/annotations.
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>
While pkg/errors ia a great utility, I don't think it's adding enough value
in this specific project to make it worth being an extra dependency.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>