cobradocs

package module
v0.0.0-...-363595b Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 8 Imported by: 0

README

cobradocs

An alternate document generator for cobra commands.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDocumentation

func GenerateDocumentation(cmd *cobra.Command, dir string, recurse bool) error

Generates the documentation for the given cobra command in the given directory. If recurse is `true`, it will recurse through the subcommands and generate documentation for them as well

Types

type Cmd

type Cmd struct {
	Name            string   // Name of the command.
	Description     string   // Short description of the command.
	LongDescription string   // Long description of the command.
	Aliases         string   // Aliases for the command.
	Usage           string   // Usage instructions for the command.
	Commands        []*Cmd   // Sub-commands of the command.
	Flags           string   // Flags for the command.
	Examples        string   // Examples of using the command.
	SeeAlso         []string // Related commands or resources.
}

Cmd represents a command in the cobra application.

func Command

func Command(cmd *cobra.Command) *Cmd

Jump to

Keyboard shortcuts

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