MCPcopy Index your code
hub / github.com/coder/coder / rcNumber

Method rcNumber

scripts/releaser/version.go:48–57  ·  view source on GitHub ↗

rcNumber returns the numeric RC identifier (e.g. 0 for "rc.0"). It returns -1 when the version is not an RC.

()

Source from the content-addressed store, hash-verified

46// rcNumber returns the numeric RC identifier (e.g. 0 for "rc.0").
47// It returns -1 when the version is not an RC.
48func (v version) rcNumber() int {
49 if !v.IsRC() {
50 return -1
51 }
52 n, err := strconv.Atoi(strings.TrimPrefix(v.Pre, "rc."))
53 if err != nil {
54 return -1
55 }
56 return n
57}
58
59func (v version) GreaterThan(b version) bool {
60 if v.Major != b.Major {

Callers 3

runReleaseFunction · 0.95
GreaterThanMethod · 0.95
TestVersionRCNumberFunction · 0.80

Calls 1

IsRCMethod · 0.95

Tested by 1

TestVersionRCNumberFunction · 0.64