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

package clidocstool

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

Index

Constants

const (
	// AnnotationExternalUrl specifies an external link annotation
	AnnotationExternalUrl = "docs.external.url"
)

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) 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
}

Options defines options for cli-docs-tool

Source Files

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

Version
v0.2.0
Published
Nov 4, 2021
Platform
linux/amd64
Imports
16 packages
Last checked
now

Tools for package owners.