help

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandDescriptor

type CommandDescriptor interface {
	ShortDescription() string
}

type Help

type Help interface {
	Write(w io.Writer) error

	AppendFlags(...params.Flag)
}

func New

func New(
	fullname string, shortDescription string,
	options ...Option,
) Help

type Option

type Option func(*help) *help

func WitArgs

func WitArgs(arg []params.Arg) Option

func WithDescription

func WithDescription(tpl *template.Template) Option

func WithFlags

func WithFlags(flg []params.Flag) Option

func WithSubcommands

func WithSubcommands(cmds map[string]CommandDescriptor) Option

Jump to

Keyboard shortcuts

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