meta

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMeta

func IsMeta(input string) bool

IsMeta returns true if the input starts with ':'.

Types

type CommandHandler

type CommandHandler func(ctx context.Context, args []string) (string, error)

CommandHandler is a function that handles a meta command.

type Registry

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

Registry holds registered meta commands.

func NewRegistry

func NewRegistry(eng *engine.Engine, setLimit func(int)) *Registry

NewRegistry creates a new command registry with default commands.

func (*Registry) Dispatch

func (r *Registry) Dispatch(ctx context.Context, input string) (string, error)

Dispatch parses and executes a meta command.

func (*Registry) Register

func (r *Registry) Register(name, description string, handler CommandHandler)

Register adds a command to the registry.

Jump to

Keyboard shortcuts

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