cli

package
v0.0.0-...-c57cf68 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2015 License: GPL-3.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DispatchCommand

func DispatchCommand(commands []Command, arguments []string, name string) error

Types

type Command

type Command struct {
	Name        string
	Description string
	Dispatcher  CommandDispatcher
}

type CommandDispatchError

type CommandDispatchError string

func (CommandDispatchError) Error

func (e CommandDispatchError) Error() string

type CommandDispatchFunction

type CommandDispatchFunction func(name string, arguments []string) error

func (CommandDispatchFunction) Dispatch

func (f CommandDispatchFunction) Dispatch(name string, arguments []string) error

type CommandDispatcher

type CommandDispatcher interface {
	Dispatch(name string, arguments []string) error
}

type Usage

type Usage struct {
	Usage       string
	Description string
	Commands    []Command

	Out   io.Writer
	Flags *flag.FlagSet
}

func (*Usage) Print

func (u *Usage) Print()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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