MCPcopy Index your code
hub / github.com/bootdotdev/bootdev / isUpdateRequired

Function isUpdateRequired

version/version.go:64–68  ·  view source on GitHub ↗

Returns true if the latest version has a higher major or minor number than the current version. If you don't want to force an update, you can increment the patch number instead.

(current string, latest string)

Source from the content-addressed store, hash-verified

62// number than the current version. If you don't want to force
63// an update, you can increment the patch number instead.
64func isUpdateRequired(current string, latest string) bool {
65 latestMajorMinor := semver.MajorMinor(latest)
66 currentMajorMinor := semver.MajorMinor(current)
67 return semver.Compare(currentMajorMinor, latestMajorMinor) < 0
68}
69
70func getLatestVersion() (string, error) {
71 goproxyDefault := "https://proxy.golang.org"

Callers 1

FetchUpdateInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected