handler

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 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 Handler

type Handler struct {
	Name     string
	Aliases  []string
	Cmd      uint8
	Help     string
	About    string
	Usage    string
	Run      func(string) error
	Complete func(string, string) []string
}

func (Handler) GoString

func (h Handler) GoString() string

func (*Handler) HasPrefix

func (h *Handler) HasPrefix(s string) bool

func (*Handler) Matches

func (h *Handler) Matches(s string) bool

func (Handler) String

func (h Handler) String() string

type Set

type Set []Handler

func (Set) CommandsAndAliases

func (s Set) CommandsAndAliases() []string

func (Set) Complete

func (s Set) Complete(buf string) []string

func (Set) CompleteHelp

func (s Set) CompleteHelp(command, arg string) []string

func (Set) Find

func (s Set) Find(c uint8) *Handler

func (Set) Match

func (s Set) Match(cmd string) *Handler

func (Set) Names

func (s Set) Names() []string

func (Set) RunHelp

func (s Set) RunHelp(arg string) error

func (Set) ShowUsage

func (s Set) ShowUsage(c uint8)

Directories

Path Synopsis
This package defines the commands for the search result prompt.
This package defines the commands for the search result prompt.

Jump to

Keyboard shortcuts

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