commands

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Name        string
	Summary     string
	Description string
	Flags       shell.FlagHandlerFunction
	Function    shell.HandlerFunction
}

Command allows to define a shell handler with metadata.

func (*Command) Define added in v0.4.0

func (command *Command) Define(flagDefiner shell.FlagDefiner)

Define allows the function to define command-line

func (*Command) Execute

func (command *Command) Execute(writer shell.ResponseWriter, request *shell.Request) error

Execute will execute the command function

type HelpCommand

type HelpCommand struct {
	// The command string that should be used to call this function,
	// used in the default function output
	Usage string
}

HelpCommand allows for basic output of command metadata.

func (*HelpCommand) Execute

func (command *HelpCommand) Execute(writer shell.ResponseWriter, request *shell.Request) error

Execute will execute the help command

Jump to

Keyboard shortcuts

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