plugprint

package
v0.0.0-...-289cda9 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 10 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(w io.Writer, main plugins.Plugin) error

Print will try and print a helpful Usage printing of the plugin and any plugins that are provided.

$ buffalo
---------

Usage of buffalo:
-h, --help   print this help

Available Commands:
	buffalo fix      Attempt to fix a Buffalo application's API to match version in go.mod
	buffalo info     Print diagnostic information (useful for debugging)
	buffalo version  Print the version information

Types

type Aliaser

type Aliaser = plugcmd.Aliaser

type CommandNamer

type CommandNamer = plugcmd.Namer

type Describer

type Describer interface {
	Description() string
}

Describer is called by `Print` and can be implemented to print a short, single line, description of the plugin. `-h`

type FlagPrinter

type FlagPrinter interface {
	PrintFlags(w io.Writer) error
}

type Hider

type Hider interface {
	HidePlugin()
}

type PluginScoper

type PluginScoper = plugins.Scoper

type SubCommander

type SubCommander = plugcmd.SubCommander

type UsagePrinter

type UsagePrinter interface {
	PrintUsage(w io.Writer) error
}

UsagePrinter is called by `Print` and can be implemented to print a large block of usage information after the `Describer` interface is called. This is useful for printing flag information, links, and other messages to users.

Jump to

Keyboard shortcuts

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