MCPcopy Create free account
hub / github.com/jetify-com/devbox / SemverCompare

Function SemverCompare

internal/vercheck/vercheck.go:288–296  ·  view source on GitHub ↗
(ver1, ver2 string)

Source from the content-addressed store, hash-verified

286}
287
288func SemverCompare(ver1, ver2 string) int {
289 if !strings.HasPrefix(ver1, "v") {
290 ver1 = "v" + ver1
291 }
292 if !strings.HasPrefix(ver2, "v") {
293 ver2 = "v" + ver2
294 }
295 return semver.Compare(ver1, ver2)
296}
297
298// latestVersion returns the latest version available for the binary.
299func latestVersion() string {

Callers 3

printSuccessMessageFunction · 0.85
isNewLauncherAvailableFunction · 0.85
isNewDevboxAvailableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected