Documentation ¶
Index ¶
- func CreateShellCompletionScriptGenCommand() *cobra.Command
- func CreateUpdateCommand(owner, repo, version, binaryName string) *cobra.Command
- func RunSelfUpdate(owner, repo, requestedTag, version, binaryName string, ...) (err error)
- func RunSelfUpdateFn(owner, repo, currentVersion, binaryName string) func(cmd *cobra.Command, args []string)
- type GetReleaseFn
- type Release
- type ResolveBinaryPathFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateShellCompletionScriptGenCommand ¶ added in v0.0.10
CreateShellCompletionScriptGenCommand generates completion shell scripts
func CreateUpdateCommand ¶
CreateUpdateCommand creates the 'config' sub command
func RunSelfUpdate ¶
func RunSelfUpdate(owner, repo, requestedTag, version, binaryName string, resolveBinaryPathFn ResolveBinaryPathFn, getReleaseFn GetReleaseFn) (err error)
RunSelfUpdate checks whether the github.com/owner/repo has a release that is more recent that the specified version. If one exists, tries to find a binary asset that matches the current platform and the provided binaryName. If one is found, it is downloaded to the path of the current executable.
Types ¶
type GetReleaseFn ¶
GetReleaseFn ...
type Release ¶
type Release interface { TagName() string DownloadBinary(string) (io.ReadCloser, error) }
Release a GitHub realease facade
func GetLatestRelease ¶
GetLatestRelease returns the latest github non-draft release of this program.
type ResolveBinaryPathFn ¶
ResolveBinaryPathFn ...
Click to show internal directories.
Click to hide internal directories.