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

Method Segments

pkg/util/constraint/version.go:340–346  ·  view source on GitHub ↗

Segments returns the numeric segments of the version as a slice of ints. This excludes any metadata or pre-release information. For example, for a version "1.2.3-beta", segments will return a slice of 1, 2, 3.

()

Source from the content-addressed store, hash-verified

338// for a version "1.2.3-beta", segments will return a slice of
339// 1, 2, 3.
340func (v *Version) Segments() []int {
341 segmentSlice := make([]int, len(v.segments))
342 for i, v := range v.segments {
343 segmentSlice[i] = int(v)
344 }
345 return segmentSlice
346}
347
348// Segments64 returns the numeric segments of the version as a slice of int64s.
349//

Callers 1

TestVersionSegmentsFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestVersionSegmentsFunction · 0.76