cli-docs-tool – github.com/docker/cli-docs-tool Index | Files | Directories

package clidocstool

import "github.com/docker/cli-docs-tool"

Index

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents an active cli-docs-tool object

func New

func New(opts Options) (*Client, error)

New initializes a new cli-docs-tool client

func (*Client) GenAllTree

func (c *Client) GenAllTree() error

GenAllTree creates all structured ref files for this command and all descendants in the directory given.

func (*Client) GenManTree

func (c *Client) GenManTree(cmd *cobra.Command) error

GenManTree generates a man page for the command and all descendants. If SOURCE_DATE_EPOCH is set, in order to allow reproducible package builds, we explicitly set the build time to SOURCE_DATE_EPOCH.

func (*Client) GenMarkdownTree

func (c *Client) GenMarkdownTree(cmd *cobra.Command) error

GenMarkdownTree will generate a markdown page for this command and all descendants in the directory given.

func (*Client) GenYamlTree

func (c *Client) GenYamlTree(cmd *cobra.Command) error

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`.

type Options

type Options struct {
	Root      *cobra.Command
	SourceDir string
	TargetDir string
	Plugin    bool

	ManHeader *doc.GenManHeader
}

Options defines options for cli-docs-tool

Source Files

clidocstool.go clidocstool_man.go clidocstool_md.go clidocstool_yaml.go markdown.go

Directories

PathSynopsis
annotation
Version
v0.8.0
Published
Jul 2, 2024
Platform
windows/amd64
Imports
20 packages
Last checked
now

Tools for package owners.