MCPcopy Index your code
hub / github.com/commitdev/zero / checkSemver

Function checkSemver

cmd/check.go:95–98  ·  view source on GitHub ↗

checkSemver validates that the version of a tool meets the minimum required version listed in your requirement. Returns a boolean. For more information on parsing semver, see semver.org If your tool doesn't do full semver then you may need to add custom logic to support it.

(req requirement, actualVersion *semver.Version)

Source from the content-addressed store, hash-verified

93// If your tool doesn't do full semver then you may need to add custom logic
94// to support it.
95func checkSemver(req requirement, actualVersion *semver.Version) bool {
96 requiredVersion := semver.New(req.minVersion)
97 return actualVersion.LessThan(*requiredVersion)
98}
99
100var checkCmd = &cobra.Command{
101 Use: "check",

Callers 1

check.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected