Documentation ¶
Index ¶
Constants ¶
const ( ExitCodeOK int = 0 ExitCodeFailed int = 1 )
ExitCodes
const ( // DefaultVCSHost is the default VCS host name. DefaultVCSHost = "github.com" // DefaultLocalDir is the default path to store directory. DefaultLocalDir = "~/.gcli.d" // DefaultLocalStaticDir is the default path for static file. DefaultLocalStaticDir = "static" )
const CheckTimeout = 3 * time.Second
CheckTimeout is timeout of executing go-latest.Check()
const (
// EnvGoPath is env name of GOPATH
EnvGoPath = "GOPATH"
)
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 ¶
type ApplyCommand struct {
Meta
}
ApplyCommand is a Command that generates a new cli project
func (*ApplyCommand) Help ¶
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 ¶
func (c *ApplyCommand) Run(args []string) int
Run generates a new cli project. It returns exit code
func (*ApplyCommand) Synopsis ¶
func (c *ApplyCommand) Synopsis() string
Synopsis is a one-line, short synopsis of the command.
type CommandFlag ¶
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
type DesignCommand ¶
type DesignCommand struct {
Meta
}
DesignCommand is a Command that generates a new cli project
func (*DesignCommand) Help ¶
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 ¶
func (c *DesignCommand) Run(args []string) int
Run generates a new cli project. It returns exit code
func (*DesignCommand) Synopsis ¶
func (c *DesignCommand) Synopsis() string
Synopsis is a one-line, short synopsis of the command.
type FlagFlag ¶
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.
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 ¶
Meta contain the meta-option that nealy all subcommand inherited.
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 ¶
type ValidateCommand struct {
Meta
}
ValidateCommand is a Command that validate template file
func (*ValidateCommand) Help ¶
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 ¶
func (c *ValidateCommand) Run(args []string) int
Run validates template file
func (*ValidateCommand) Synopsis ¶
func (c *ValidateCommand) Synopsis() string
Synopsis is a one-line, short synopsis of the command.
type VersionCommand ¶
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.