plugprint

package
v2.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: MIT Imports: 7 Imported by: 0

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 Aliases

type Aliases = plugins.Aliases

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 NamedCommand

type NamedCommand = plugins.NamedCommand

type PluginScoper

type PluginScoper = plugins.PluginScoper

type SubCommander

type SubCommander interface {
	SubCommands() []plugins.Plugin
}

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