Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetTestOverrides ¶
func SetTestOverrides(client *http.Client, apiBaseURL, downloadBaseURL string, execFn func() (string, error)) func()
SetTestOverrides overrides package-level settings for external test packages. Returns a cleanup function that restores the originals.
func WriteCacheAfterUpdate ¶
func WriteCacheAfterUpdate(latestVersion string)
WriteCacheAfterUpdate updates the cache so a stale notification isn't shown after an update.
Types ¶
type CheckResult ¶
CheckResult holds the outcome of a version check.
func CheckForUpdate ¶
func CheckForUpdate(currentVersion string) *CheckResult
CheckForUpdate checks whether a newer version of pacto is available. Returns nil if version is "dev", on any error, or if already up-to-date.
type PluginUpdateResult ¶ added in v0.17.0
PluginUpdateResult holds the outcome of a single plugin update.
func UpdatePlugins ¶ added in v0.17.0
func UpdatePlugins() ([]PluginUpdateResult, error)
UpdatePlugins discovers installed pacto plugins and updates them to the latest version.
type UpdateResult ¶
UpdateResult holds the outcome of a self-update.
func Update ¶
func Update(currentVersion, targetVersion string) (*UpdateResult, error)
Update downloads and installs the specified version of pacto. If targetVersion is empty, it fetches the latest release.