registrar

package
v0.0.0-...-3a36f6d Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("subcommand not found")

Functions

func Alias

func Alias(alias string, subcommandOrNamespace string)

func Call

func Call(conf *config.Config, subcommand string, args []string) error

func GenManpage

func GenManpage(version string)

func List

func List()

func RegisterSubCommand

func RegisterSubCommand(subcommand string, callback Callback, helptext ...string)

Types

type Callback

type Callback func(*config.Config, []string) error

type Namespace

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

func RegisterNamespace

func RegisterNamespace(subcommand string, helptext ...string) *Namespace

func (*Namespace) Call

func (ns *Namespace) Call(conf *config.Config, nsArgs []string) error

func (*Namespace) List

func (ns *Namespace) List()

func (*Namespace) ListMan

func (ns *Namespace) ListMan()

func (*Namespace) RegisterCommand

func (ns *Namespace) RegisterCommand(command string, defaultCommand bool, callback Callback, helptext ...string)

Jump to

Keyboard shortcuts

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