cmd

package
v0.0.0-...-b459d38 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2015 License: BSD-3-Clause Imports: 1 Imported by: 4

README

godoc reference

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Default

type Default struct {
	NameStr        string
	ShortHelpStr   string
	LongHelpStr    string
	ExecuteFunc    func([]string) bool
	SubCommandList []cli.Command
}

Default is the default implementation of cli.Command.

It simply returns struct fields to satisfy the interface.

func (*Default) Execute

func (cmd *Default) Execute(args []string) bool

func (*Default) LongHelp

func (cmd *Default) LongHelp() string

func (*Default) Name

func (cmd *Default) Name() string

func (*Default) ShortHelp

func (cmd *Default) ShortHelp() string

func (*Default) SubCommands

func (cmd *Default) SubCommands() []cli.Command

type Root

type Root struct {
	Help           string
	SubCommandList []cli.Command
}

Root implements cli.Command.

It represents the command to your CLI with no arguments and has only a help string and a list of sub commands.

func (*Root) Execute

func (cmd *Root) Execute([]string) bool

The root command isn't run because a call to the CLI with no arguments should print out the Help string

func (*Root) LongHelp

func (cmd *Root) LongHelp() string

func (*Root) Name

func (cmd *Root) Name() string

func (*Root) ShortHelp

func (cmd *Root) ShortHelp() string

There's no short help for the root command

func (*Root) SubCommands

func (cmd *Root) SubCommands() []cli.Command

Jump to

Keyboard shortcuts

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