Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version = "3.9.1"
Version represents the value of the current semantic version.
Functions ¶
func AIsNewerThanB ¶
AIsNewerThanB compares two semantic versions and returns true if A is newer than B. The function will return an error if either version is not a valid semantic version.
func PrintVersion ¶
PrintVersion prints the current version of sops. If the flag `--disable-version-check` is set, the function will not attempt to retrieve the latest version from the GitHub API.
If the flag is not set, the function will attempt to retrieve the latest version from the GitHub API and compare it to the current version. If the latest version is newer, the function will print a message to stdout.
func RetrieveLatestReleaseVersion ¶
RetrieveLatestReleaseVersion fetches the latest release version from GitHub. Returns the latest version as a string and the release URL, or an error if the request failed or the response could not be parsed.
The function first attempts redirection-based retrieval (HTTP 301). It's preferred over GitHub API due to no rate limiting, but may break on redirect changes. If the first attempt fails, it falls back to the GitHub API.
Unlike RetrieveLatestVersionFromUpstream, it returns the tag (e.g. "v3.7.3").
func RetrieveLatestVersionFromUpstream
deprecated
RetrieveLatestVersionFromUpstream retrieves the most recent release version from GitHub. The function returns the latest version as a string, or an error if the request fails or the response cannot be parsed.
Deprecated: This function is deprecated in favor of RetrieveLatestReleaseVersion, which also provides the URL of the latest release.
Types ¶
This section is empty.