templates

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Indentation = `  `

Variables

This section is empty.

Functions

func Examples

func Examples(s string) string

Examples normalizes a command's examples to follow the conventions.

func LongDesc

func LongDesc(s string) string

LongDesc normalizes a command's long description to follow the conventions.

func Normalize

func Normalize(cmd *cobra.Command) *cobra.Command

Normalize perform all required normalizations on a given command.

func NormalizeAll

func NormalizeAll(cmd *cobra.Command) *cobra.Command

NormalizeAll perform all required normalizations in the entire command tree.

Types

type ASCIIRenderer

type ASCIIRenderer struct {
	Indentation string
	// contains filtered or unexported fields
}

ASCIIRenderer is a blackfriday.Renderer intended for rendering markdown documents as plain text, well suited for human reading on terminals.

func (*ASCIIRenderer) RenderFooter

func (r *ASCIIRenderer) RenderFooter(w io.Writer, ast *blackfriday.Node)

RenderFooter writes document footer.

func (*ASCIIRenderer) RenderHeader

func (r *ASCIIRenderer) RenderHeader(w io.Writer, ast *blackfriday.Node)

RenderHeader writes document preamble and TOC if requested.

func (*ASCIIRenderer) RenderNode

func (r *ASCIIRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus

render markdown to text

type CommandGroup

type CommandGroup struct {
	Message  string
	Commands []*cobra.Command
}

type CommandGroups

type CommandGroups []CommandGroup

func AddAdditionalCommands

func AddAdditionalCommands(g CommandGroups, message string, cmds []*cobra.Command) CommandGroups

func (CommandGroups) Add

func (g CommandGroups) Add(c *cobra.Command)

func (CommandGroups) Has

func (g CommandGroups) Has(c *cobra.Command) bool

Jump to

Keyboard shortcuts

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