Documentation ¶
Index ¶
- Constants
- Variables
- func HasFeature(name string, commands []*cli.Command) (present bool)
- func ListFeatures(commands []*cli.Command) (names []string)
- type CCommand
- func (c *CCommand) Context() (ctx context.Context)
- func (s *CCommand) ExtraCommands(app *cli.App) (commands []*cli.Command)
- func (c *CCommand) Init(this interface{})
- func (c *CCommand) Name() (name string)
- func (s *CCommand) Prepare(ctx *cli.Context) (err error)
- func (c *CCommand) Setup(app *cli.App) (err error)
- func (c *CCommand) This() (self Command)
- type CSystem
- func (s *CSystem) Clean(ctx *cli.Context) (err error)
- func (s *CSystem) CleanAction(ctx *cli.Context) (err error)
- func (s *CSystem) Export(ctx *cli.Context) (err error)
- func (s *CSystem) ExportAction(ctx *cli.Context) (err error)
- func (s *CSystem) ExportPathVariable(export bool)
- func (s *CSystem) ExportString(ctx *cli.Context) (content string, err error)
- func (s *CSystem) GetDefaultVersion() (version string)
- func (s *CSystem) GetInstalledVersion() (version string, err error)
- func (s *CSystem) GetKnownSums() (sums map[string]string, err error)
- func (s *CSystem) IncludeCommands(app *cli.App) (commands []*cli.Command)
- func (s *CSystem) Init(this interface{})
- func (s *CSystem) InitAction(ctx *cli.Context) (err error)
- func (s *CSystem) InitSystem(ctx *cli.Context) (err error)
- func (s *CSystem) MakeDirs() (err error)
- func (s *CSystem) ParseFileName(path string) (version, osName, osArch string, err error)
- func (s *CSystem) ParseVersionString(ver string) (version string, err error)
- func (s *CSystem) PostInitSystem(ctx *cli.Context) (err error)
- func (s *CSystem) Self() (self System)
- func (s *CSystem) UnExport(ctx *cli.Context) (err error)
- func (s *CSystem) UnExportAction(ctx *cli.Context) (err error)
- func (s *CSystem) UnExportPathVariable(export bool)
- func (s *CSystem) UnExportString(ctx *cli.Context) (content string, err error)
- func (s *CSystem) VersionAction(ctx *cli.Context) (err error)
- type Command
- type System
- type SystemsManager
Constants ¶
View Source
const ( ShellCategory = "general shell" BuildCategory = "general build" SystemCategory = "system" GeneralCategory = "general" )
Variables ¶
View Source
var BashCompletionScript string = fmt.Sprintf(`#! /bin/bash PROG="%s" _cli_bash_autocomplete() { if [[ "${COMP_WORDS[0]}" != "source" ]]; then local cur opts base COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" if [[ "$cur" == "-"* ]]; then opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} ${cur} --generate-bash-completion ) else opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion ) fi COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 fi } complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete $PROG unset PROG `, BinName)
View Source
var BinName = bePath.Base(os.Args[0])
View Source
var TmpDirName = "tmp"
Functions ¶
func HasFeature ¶
func ListFeatures ¶
func ListFeatures(commands []*cli.Command) (names []string)
Types ¶
type CCommand ¶
type CCommand struct { TagName string App *cli.App Ctx context.Context // contains filtered or unexported fields }
func (*CCommand) ExtraCommands ¶
func (s *CCommand) ExtraCommands(app *cli.App) (commands []*cli.Command)
type CSystem ¶
type CSystem struct { CCommand Url string Version string Root string TarGz string TarGzPath string TarGzUrl string TarUnzip bool }
func (*CSystem) CleanAction ¶
func (*CSystem) ExportAction ¶
func (*CSystem) ExportPathVariable ¶
func (*CSystem) ExportString ¶
func (*CSystem) GetDefaultVersion ¶
func (*CSystem) GetInstalledVersion ¶
func (*CSystem) IncludeCommands ¶
func (s *CSystem) IncludeCommands(app *cli.App) (commands []*cli.Command)
func (*CSystem) InitAction ¶
func (*CSystem) InitSystem ¶
func (*CSystem) ParseFileName ¶
func (*CSystem) ParseVersionString ¶
func (*CSystem) PostInitSystem ¶
func (*CSystem) UnExportAction ¶
func (*CSystem) UnExportPathVariable ¶
func (*CSystem) UnExportString ¶
func (*CSystem) VersionAction ¶
type System ¶
type System interface { Command Self() (self System) GetKnownSums() (sums map[string]string, err error) ParseVersionString(ver string) (version string, err error) ParseFileName(path string) (version, osName, osArch string, err error) MakeDirs() (err error) InitAction(ctx *cli.Context) (err error) VersionAction(ctx *cli.Context) (err error) CleanAction(ctx *cli.Context) (err error) ExportPathVariable(export bool) ExportAction(ctx *cli.Context) (err error) UnExportPathVariable(export bool) UnExportAction(ctx *cli.Context) (err error) InitSystem(ctx *cli.Context) (err error) PostInitSystem(ctx *cli.Context) (err error) Clean(ctx *cli.Context) (err error) Export(ctx *cli.Context) (err error) ExportString(ctx *cli.Context) (content string, err error) UnExport(ctx *cli.Context) (err error) UnExportString(ctx *cli.Context) (content string, err error) GetInstalledVersion() (version string, err error) GetDefaultVersion() (version string) IncludeCommands(app *cli.App) (commands []*cli.Command) }
type SystemsManager ¶
type SystemsManager struct {
// contains filtered or unexported fields
}
func Manager ¶
func Manager() (m *SystemsManager)
func (*SystemsManager) AddCommand ¶
func (m *SystemsManager) AddCommand(c Command) *SystemsManager
func (*SystemsManager) AddSystem ¶
func (m *SystemsManager) AddSystem(s System) *SystemsManager
func (*SystemsManager) Setup ¶
func (m *SystemsManager) Setup(app *cli.App) (err error)
func (*SystemsManager) Shutdown ¶
func (m *SystemsManager) Shutdown()
Click to show internal directories.
Click to hide internal directories.