registry

package
v0.0.0-...-36e834a Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2015 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commands

func Commands() map[string]CommandConstructor

Commands returns a copy of the command registry.

func RegisterNewCommand

func RegisterNewCommand(name string, constructor CommandConstructor) error

RegisterNewCommand will add a command for got to handle when called.

Types

type Command

type Command interface {
	Run([]string) error
}

Command represents one of the possible sub-commands of got.

type CommandConstructor

type CommandConstructor func() (Command, error)

CommandConstructor is the type of the function you should implement to have your command be instantiated by the main thread..

Jump to

Keyboard shortcuts

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