1
0
mirror of https://github.com/docker/cli-docs-tool.git synced 2025-09-18 02:46:36 +03:00

20 Commits

Author SHA1 Message Date
CrazyMax
bb7d7e4afd skip hidden command recursively
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-19 14:15:54 +02:00
Sebastiaan van Stijn
2695d2cfbb format code with gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-10 12:36:04 +01:00
CrazyMax
0746f02f82 markdown: display bool type
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-02-21 10:53:25 +01:00
George Margaritis
e795250f34 Improve boolean flag documentation generation
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>
2024-02-12 16:55:22 +02:00
CrazyMax
851d1b74e9 markdown: do not generate docs for hidden commands
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-06-27 14:19:59 +02:00
Sebastiaan van Stijn
6f4440bf8b markdown: format generated tables to have equal-width columns
This makes the tables more readable when reading the source code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-29 01:05:02 +01:00
Sebastiaan van Stijn
ca8c2e2c28 markdown: use stringbuilder.WriteString()
This makes my IDE happier, as there's less unhandled errors.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-29 00:59:18 +01:00
CrazyMax
5bd820d68e markdown: replace new line in usage
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-26 06:31:33 +01:00
Sebastiaan van Stijn
23f22d3ca8 use full command as aliases
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>
2022-06-28 12:07:52 +02:00
CrazyMax
f76500199d Merge pull request #20 from thaJeztah/replace_ioutil
replace uses of os/ioutil, and use test.TempDir() in tests
2022-02-23 21:24:02 +01:00
Sebastiaan van Stijn
eb632668dd replace uses of os/ioutil, and use test.TempDir() in tests
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>
2022-02-23 20:42:04 +01:00
CrazyMax
b3ecfe17a1 annotation to override default value
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-17 13:45:16 +01:00
CrazyMax
8ced39165e display flag type and default value in dedicated columns
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-10 14:48:43 +01:00
CrazyMax
c712d9e559 annotation to specify code delimiter for flag usage
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-22 10:33:20 +01:00
CrazyMax
669397c81c always disable the addition of [flags] to the usage
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-04 13:39:10 +01:00
CrazyMax
e9f8b8c6e3 fix persistent flags
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-04 11:37:01 +01:00
Sebastiaan van Stijn
7cf6fd0546 remove github.com/pkg/errors dependency
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>
2021-11-04 10:00:03 +01:00
CrazyMax
67f339f2be New opts for setting target and plugin capabilities
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-15 18:04:30 +02:00
CrazyMax
be85b2165f Escape pipe char for Markdown table
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-03 00:59:21 +02:00
CrazyMax
40b1fb6971 Rename project
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-08-20 15:55:23 +02:00