cmd

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = map[string]Cmd{}

Commands registry

View Source
var (
	// ConfigFlag is the flag used to load the config file
	ConfigFlag string
)

Functions

func Add

func Add(name string, creator Creator)

Add output to the registry

func GetFirstCommand

func GetFirstCommand(args []string) (name string, index int)

GetFirstCommand restun first command of argument list

Types

type Cmd

type Cmd interface {
	Exec(args []string, conf *config.Config) error
	Usage()
}

type Creator

type Creator func() Cmd

Creator function for an output

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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