commands

package
v0.0.0-...-01c0eb4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = CommandMap{
	"new":     newCmd,
	"pull":    pullCmd,
	"version": versionCmd,
}

Commands is the list of commands within a map

Functions

This section is empty.

Types

type Command

type Command struct {
	Usage     func(string)
	RunMethod func([]string) error
}

Command defines the functionality and useage text for any given subcommand. These may be from either built-in commands, inline or external commands.

func (*Command) Run

func (cmd *Command) Run(args []string) error

Run will run the given command with the arguments passed

type CommandMap

type CommandMap map[string]*Command

CommandMap defines the string key for a given command, which is then used when invoking the cnf commands.

Jump to

Keyboard shortcuts

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