doc

package
v6.7.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package doc generates Markdown files and organizes a directory structure that follows the command hierarchy.

The WriteDocs function is the main entry point for generating the documentation. It recursively processes all subcommands and creates the appropriate files and directories based on the command structure, following the rules defined in determineSubdir

The GenerateSummary function is another entry point, which can create a summary.md file containing the table of contents for the generated documentation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSummary

func GenerateSummary(dir string) error

func MaintenanceHandler

func MaintenanceHandler(flagDescription, defaultValue string) string

MaintenanceHandler is a concrete strategy for --maintenance-day

func StrReplaceIfContains

func StrReplaceIfContains(title, old, new string) string

func WriteDocs

func WriteDocs(cmd *core.Command, dir string) error

Types

type FlagDefaultHandler

type FlagDefaultHandler func(flagDescription, defaultValue string) string

FlagDefaultHandler is a Strategy for handling pflag default values while generating docs

Jump to

Keyboard shortcuts

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