Documentation
¶
Index ¶
- func GetCombinedVersion() string
- func GetCommit() string
- func GetDate() string
- func GetVersion() string
- func NewSelfUpgradeCmd(org, repo, name string, customDownloadFunc CustomDownloadFunc) (cmd *cobra.Command)
- func NewVersionCmd(org, repo, name string, customDownloadFunc CustomDownloadFunc) (cmd *cobra.Command)
- func SetVersion(ver string)
- type CustomDownloadFunc
- type PrintOption
- type SelfUpgradeOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCombinedVersion ¶
func GetCombinedVersion() string
GetCombinedVersion returns the version and commit id
func NewSelfUpgradeCmd ¶
func NewSelfUpgradeCmd(org, repo, name string, customDownloadFunc CustomDownloadFunc) (cmd *cobra.Command)
NewSelfUpgradeCmd create a command for self upgrade
func NewVersionCmd ¶
func NewVersionCmd(org, repo, name string, customDownloadFunc CustomDownloadFunc) (cmd *cobra.Command)
NewVersionCmd create a command for version
Types ¶
type CustomDownloadFunc ¶
CustomDownloadFunc is the function interface for custom download URL
type PrintOption ¶
PrintOption is the version option
type SelfUpgradeOption ¶
type SelfUpgradeOption struct {
ShowProgress bool
Privilege bool
Org string
Repo string
Name string
CustomDownloadFunc CustomDownloadFunc
PathSeparate string
Thread int
GitHubClient *github.Client
RoundTripper http.RoundTripper
}
SelfUpgradeOption is the option for self upgrade command
Click to show internal directories.
Click to hide internal directories.