Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(ctx context.Context, currentVersion string, v Versioner) (current, latest semver.Version, shouldUpdate bool, err error)
Check if the CLI can be updated.
func CheckAsync ¶
func CheckAsync(ctx context.Context, file config.File, configFilePath string, currentVersion string, v Versioner) (printResults func(io.Writer))
CheckAsync is a helper function for Check. If the LastVersionCheck time is more than 24 hours ago, launch a goroutine to perform the Check using the provided context. Return a function that will print an informative message to the writer if there is a newer version available.
Callers should invoke CheckAsync via
f := CheckAsync(...) defer f()
Types ¶
type GitHub ¶
type GitHub struct {
// contains filtered or unexported fields
}
GitHub is a versioner that uses GitHub releases.
type RootCommand ¶
RootCommand is the parent command for all subcommands in this package. It should be installed under the primary root command.
func NewRootCommand ¶
func NewRootCommand(parent common.Registerer, v Versioner, client api.HTTPClient) *RootCommand
NewRootCommand returns a new command registered in the parent.
Click to show internal directories.
Click to hide internal directories.