package clidocstool
import "github.com/docker/cli-docs-tool"
Index ¶
- func DisableFlagsInUseLine(cmd *cobra.Command)
- func GenMarkdownTree(cmd *cobra.Command, dir string) error
- func GenTree(cmd *cobra.Command, dir string) error
- func GenYamlCustom(cmd *cobra.Command, w io.Writer) error
- func GenYamlTree(cmd *cobra.Command, dir string) error
- func GenYamlTreeCustom(cmd *cobra.Command, dir string, filePrepender func(string) string) error
- func VisitAll(root *cobra.Command, fn func(*cobra.Command))
Functions ¶
func DisableFlagsInUseLine ¶
DisableFlagsInUseLine sets the DisableFlagsInUseLine flag on all commands within the tree rooted at cmd.
func GenMarkdownTree ¶
GenMarkdownTree will generate a markdown page for this command and all descendants in the directory given.
func GenTree ¶
GenTree creates yaml and markdown structured ref files for this command and all descendants in the directory given. This function will just call GenMarkdownTree and GenYamlTree functions successively.
func GenYamlCustom ¶
GenYamlCustom creates custom yaml output. nolint: gocyclo
func GenYamlTree ¶
GenYamlTree creates yaml structured ref files for this command and all descendants in the directory given. This function may not work correctly if your command names have `-` in them. If you have `cmd` with two subcmds, `sub` and `sub-third`, and `sub` has a subcommand called `third` it is undefined which help output will be in the file `cmd-sub-third.1`.
func GenYamlTreeCustom ¶
GenYamlTreeCustom creates yaml structured ref files.
func VisitAll ¶
VisitAll will traverse all commands from the root. This is different from the VisitAll of cobra.Command where only parents are checked.
Source Files ¶
clidocstool.go clidocstool_md.go clidocstool_yaml.go markdown.go
- Version
- v0.1.1
- Published
- Sep 3, 2021
- Platform
- linux/amd64
- Imports
- 16 packages
- Last checked
- now –
Tools for package owners.