apphelp

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// SimplifiedHelpTemplate is the help template with simplified usage and excluded global flags
	SimplifiedHelpTemplate string

	// ErrReadingTemplateFile is returned when reading help template fails
	ErrReadingTemplateFile = errors.New("could not read help template file")
)

Functions

func SetTemplates

func SetTemplates(globalFlags []cli.Flag)

SetTemplates sets up custom help outputs for app, commands and subcommands

func Setup

func Setup(app *cli.App)

Setup sets up custom help outputs and uniforms behavior of help flag and command.

Default help command and flag from urfave/cli have some known discrepancies (https://github.com/urfave/cli/issues/557) which are removed by the custom help command that is added by this function. Help flag needs to be added manually as it is not appended by the library in case of custom help command being specified.

Types

This section is empty.

Jump to

Keyboard shortcuts

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