description

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DescribeCommand

func DescribeCommand(exec Executor, data CommandData, writer io.Writer) error

func DetailExecutor

func DetailExecutor() *template.Template

func SimpleExecutor

func SimpleExecutor() *template.Template

Types

type ArgumentData

type ArgumentData struct {
	Name        string
	Description []string
	Type        schema.Type
	Variadic    bool
}

type CommandData

type CommandData struct {
	Program     string
	Version     string
	Path        name.Path
	Syntax      string
	Description []string
	Options     []OptionData
	Arguments   []ArgumentData
	Subcommands []SubcommandData
}

func CreateCommandData

func CreateCommandData(program string, version string, subcommand name.Path, cmd *schema.Command) CommandData

func (CommandData) HasArguments

func (d CommandData) HasArguments() bool

func (CommandData) HasOptions

func (d CommandData) HasOptions() bool

func (CommandData) HasSubcommands

func (d CommandData) HasSubcommands() bool

type Executor

type Executor interface {
	Execute(wr io.Writer, data any) error
}

type OptionData

type OptionData struct {
	Names       []string
	Description []string
	Type        schema.Type
	Default     string
}

type SubcommandData

type SubcommandData struct {
	Name        string
	Description []string
}

Jump to

Keyboard shortcuts

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