cmd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package cmd is the package that contains all of the command handling logic.

Package cmd is the package that contains all of the command handling logic.

Package cmd is the package that contains all of the command handling logic.

Package cmd is the package that contains all of the command handling logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	api.CreateCommandData

	// Subs is the map of subcommands.
	Subs map[string]*Command

	// HandlerFunc is the command handler function.
	HandlerFunc func(cmd *Command, s *state.State) cmdroute.CommandHandlerFunc
	// AutocompleterFunc is the command autocompleter function.
	AutocompleterFunc func(cmd *Command, s *state.State) cmdroute.AutocompleterFunc
	// contains filtered or unexported fields
}

Command is the struct that contains all of the information about a command.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is the manager for commands.

func NewManager

NewManager creates a new command manager.

func (*Manager) All

func (m *Manager) All() map[string]*Command

All returns all of the commands.

func (*Manager) RegisterCommand

func (m *Manager) RegisterCommand(cmd *Command)

RegisterCommand registers a command.

func (*Manager) RegisterCommands

func (m *Manager) RegisterCommands(cmds ...*Command)

RegisterCommands registers multiple commands.

Jump to

Keyboard shortcuts

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