command

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2015 License: MIT Imports: 14 Imported by: 15

Documentation

Index

Constants

View Source
const (
	ExitCodeOK     int = 0
	ExitCodeFailed int = 1
)

ExitCodes

View Source
const CheckTimeout = 3 * time.Second

CheckTimeout is timeout of executing go-latest.Check()

Variables

This section is empty.

Functions

func CheckLatest

func CheckLatest(version string) <-chan *latest.CheckResponse

CheckLatest run tcnksm/go-latest with gcli settings. It retuns channel of checking results. Even if something wrong happened, it neglects error because this is not important part of gcli execution.

Types

type ApplyCommand added in v0.2.2

type ApplyCommand struct {
	Meta
}

ApplyCommand is a Command that generates a new cli project

func (*ApplyCommand) Help added in v0.2.2

func (c *ApplyCommand) Help() string

Help is a long-form help text that includes the command-line usage, a brief few sentences explaining the function of the command, and the complete list of flags the command accepts.

func (*ApplyCommand) Run added in v0.2.2

func (c *ApplyCommand) Run(args []string) int

Run generates a new cli project. It returns exit code

func (*ApplyCommand) Synopsis added in v0.2.2

func (c *ApplyCommand) Synopsis() string

Synopsis is a one-line, short synopsis of the command.

type CommandFlag

type CommandFlag []*skeleton.Command

CommandFlag implements the flag.Value interface and allows multiple calls to the same variable to append a list. It parses string and set them as skeleton.Command.

func (*CommandFlag) Set

func (c *CommandFlag) Set(v string) error

Set parses input string and appends it on CommandFlags. Input format must be NAME[:SYNOPSIS] format.x

func (*CommandFlag) String

func (c *CommandFlag) String() string

String

type DesignCommand added in v0.2.2

type DesignCommand struct {
	Meta
}

DesignCommand is a Command that generates a new cli project

func (*DesignCommand) Help added in v0.2.2

func (c *DesignCommand) Help() string

Help is a long-form help text that includes the command-line usage, a brief few sentences explaining the function of the command, and the complete list of flags the command accepts.

func (*DesignCommand) Run added in v0.2.2

func (c *DesignCommand) Run(args []string) int

Run generates a new cli project. It returns exit code

func (*DesignCommand) Synopsis added in v0.2.2

func (c *DesignCommand) Synopsis() string

Synopsis is a one-line, short synopsis of the command.

type FlagFlag

type FlagFlag []*skeleton.Flag

FlagFlag implements the flag.Value interface and allows multiple calls to the same variable to append a list. It parses string and set them as skeleton.Flag.

func (*FlagFlag) Set

func (f *FlagFlag) Set(v string) error

Set parses input string and appends it on FlagdFlag. Input format must be NAME:TYPE:SYNOPSIS format.

func (*FlagFlag) String

func (f *FlagFlag) String() string

String

type ListCommand

type ListCommand struct {
	Meta
}

ListCommand is a Command that lists all avairable frameworks

func (*ListCommand) Help

func (c *ListCommand) Help() string

Help is a long-form help text that includes the command-line usage, a brief few sentences explaining the function of the command, and the complete list of flags the command accepts.

func (*ListCommand) Run

func (c *ListCommand) Run(args []string) int

Run lists all avairable frameworks.

func (*ListCommand) Synopsis

func (c *ListCommand) Synopsis() string

Synopsis is a one-line, short synopsis of the command.

type Meta

type Meta struct {
	UI cli.Ui
}

Meta contain the meta-option that nealy all subcommand inherited.

func (*Meta) NewFlagSet added in v0.2.3

func (m *Meta) NewFlagSet(name string, helpText string) *flag.FlagSet

NewFlagSet generates commom flag.FlagSet

type NewCommand

type NewCommand struct {
	Meta
}

NewCommand is a Command that generates a new cli project

func (*NewCommand) Help

func (c *NewCommand) Help() string

Help is a long-form help text that includes the command-line usage, a brief few sentences explaining the function of the command, and the complete list of flags the command accepts.

func (*NewCommand) Run

func (c *NewCommand) Run(args []string) int

Run generates a new cli project. It returns exit code

func (*NewCommand) Synopsis

func (c *NewCommand) Synopsis() string

Synopsis is a one-line, short synopsis of the command.

type ValidateCommand added in v0.2.2

type ValidateCommand struct {
	Meta
}

ValidateCommand is a Command that validate template file

func (*ValidateCommand) Help added in v0.2.2

func (c *ValidateCommand) Help() string

Help is a long-form help text that includes the command-line usage, a brief few sentences explaining the function of the command, and the complete list of flags the command accepts.

func (*ValidateCommand) Run added in v0.2.2

func (c *ValidateCommand) Run(args []string) int

Run validates template file

func (*ValidateCommand) Synopsis added in v0.2.2

func (c *ValidateCommand) Synopsis() string

Synopsis is a one-line, short synopsis of the command.

type VersionCommand

type VersionCommand struct {
	Meta

	Version  string
	Revision string
}

VersionCommand is a Command that shows version

func (*VersionCommand) Help

func (c *VersionCommand) Help() string

Help is a long-form help text. In this case, help text is not neccessary.

func (*VersionCommand) Run

func (c *VersionCommand) Run(args []string) int

Run shows version string and commit hash if it exists. It returns exit code

func (*VersionCommand) Synopsis

func (c *VersionCommand) Synopsis() string

Synopsis is a one-line, short synopsis of the command.

Jump to

Keyboard shortcuts

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