commands

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handlers = map[string]Command{}

Handlers maps command names to their implementations.

Functions

func Help added in v0.0.3

func Help(args []resp.Value) resp.Value

Help command: Displays documentation for all or a specific command.

func RegisterCommand added in v0.0.3

func RegisterCommand(name string, fn func([]resp.Value) resp.Value, doc string)

RegisterCommand registers a command function with its documentation.

Types

type Command added in v0.0.3

type Command struct {
	Func func([]resp.Value) resp.Value
	Doc  string
}

Command represents a command with an associated function and documentation.

Jump to

Keyboard shortcuts

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