cobradocs

package
v1.0.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package cobradocs renders Markdown reference documentation for a Cobra command tree, independent of any particular CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HideCommands

func HideCommands(cmd *cobra.Command, condition func(*cobra.Command) bool)

HideCommands hides every command in the tree for which condition reports true, pruning it (and its subtree) from generated output.

func Markdown

func Markdown(root *cobra.Command, w io.Writer, opts MarkdownOptions) error

Markdown writes reference documentation for root and all of its subcommands.

Types

type MarkdownOptions

type MarkdownOptions struct {
	// Frontmatter is prepended verbatim to the output, before any command docs.
	Frontmatter string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL