MCPcopy Create free account
hub / github.com/devspace-sh/devspace / Core

Method Core

pkg/util/constraint/version.go:281–285  ·  view source on GitHub ↗

Core returns a new version constructed from only the MAJOR.MINOR.PATCH segments of the version, without prerelease or metadata.

()

Source from the content-addressed store, hash-verified

279// Core returns a new version constructed from only the MAJOR.MINOR.PATCH
280// segments of the version, without prerelease or metadata.
281func (v *Version) Core() *Version {
282 segments := v.Segments64()
283 segmentsOnly := fmt.Sprintf("%d.%d.%d", segments[0], segments[1], segments[2])
284 return Must(NewVersion(segmentsOnly))
285}
286
287// Equal tests if two versions are equal.
288func (v *Version) Equal(o *Version) bool {

Callers 1

TestCoreFunction · 0.95

Calls 3

Segments64Method · 0.95
MustFunction · 0.85
NewVersionFunction · 0.85

Tested by 1

TestCoreFunction · 0.76